🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
✨ feat:support LobeHub MarketPlace (#8841)
Shinji-Li8d362cf6b6b4
diff --git a/apps/desktop/src/main/controllers/AuthCtr.ts b/apps/desktop/src/main/controllers/AuthCtr.tsindex 599bb43179d..5394f828b88 100644--- a/apps/desktop/src/main/controllers/AuthCtr.ts+++ b/apps/desktop/src/main/controllers/AuthCtr.ts@@ -1,4 +1,4 @@-import { DataSyncConfig } from '@lobechat/electron-client-ipc';+import { DataSyncConfig, MarketAuthorizationParams } from '@lobechat/electron-client-ipc';import { BrowserWindow, shell } from 'electron';import crypto from 'node:crypto';import querystring from 'node:querystring';@@ -117,7 +117,32 @@ export default class AuthCtr extends ControllerModule {}/**- * Start polling mechanism to retrieve credentials+ * Request Market OAuth authorization (desktop)+ */+ @ipcClientEvent('requestMarketAuthorization')+ async requestMarketAuthorization(params: MarketAuthorizationParams) {+ const { authUrl } = params;++ if (!authUrl) {+ const errorMessage = 'Market authorization URL is required';+ logger.error(errorMessage);+ return { error: errorMessage, success: false };+ }++ logger.info(`Requesting market authorization via: ${authUrl}`);+ try {+ await shell.openExternal(authUrl);+ logger.debug('Opening market authorization URL in default browser');+ return { success: true };+ } catch (error) {+ const message = error instanceof Error ? error.message : String(error);+ logger.error('Market authorization request failed:', error);+ return { error: message, success: false };+ }+ }++ /**+ * 启动轮询机制获取凭证*/private startPolling() {if (!this.authRequestState) {diff --git a/apps/desktop/src/main/core/infrastructure/ProtocolManager.ts b/apps/desktop/src/main/core/infrastructure/ProtocolManager.tsindex e0bcacb0d5a..7b08cc91db9 100644--- a/apps/desktop/src/main/core/infrastructure/ProtocolManager.ts+++ b/apps/desktop/src/main/core/infrastructure/ProtocolManager.ts@@ -50,7 +50,9 @@ export class ProtocolManager {// Check if already registeredconst isCurrentlyRegistered = app.isDefaultProtocolClient(this.protocolScheme);- logger.debug(`🔗 [Protocol] Is currently default protocol client: ${isCurrentlyRegistered}`);+ logger.debug(+ `🔗 [Protocol] ${this.protocolScheme}:// is currently registered: ${isCurrentlyRegistered}`,+ );// Register as default protocol clientlet registrationResult: boolean;@@ -71,7 +73,9 @@ export class ProtocolManager {registrationResult = app.setAsDefaultProtocolClient(this.protocolScheme);}- logger.debug(`🔗 [Protocol] Registration result: ${registrationResult}`);+ logger.debug(+ `🔗 [Protocol] Registration result for ${this.protocolScheme}://: ${registrationResult}`,+ );if (!registrationResult) {logger.error(@@ -83,7 +87,9 @@ export class ProtocolManager {// Verify registrationconst isRegisteredAfter = app.isDefaultProtocolClient(this.protocolScheme);- logger.debug(`🔗 [Protocol] Final registration status: ${isRegisteredAfter}`);+ logger.debug(+ `🔗 [Protocol] Final registration status for ${this.protocolScheme}://: ${isRegisteredAfter}`,+ );}/**@@ -123,7 +129,6 @@ export class ProtocolManager {*/private getProtocolUrlFromArgs(args: string[]): string | null {const protocolPrefix = `${this.protocolScheme}://`;-logger.debug(`🔗 [Protocol] Searching for protocol URLs in args: ${JSON.stringify(args)}`);logger.debug(`🔗 [Protocol] Looking for prefix: ${protocolPrefix}`);diff --git a/locales/ar/discover.json b/locales/ar/discover.jsonindex 5829e901a09..05492c9f03e 100644--- a/locales/ar/discover.json+++ b/locales/ar/discover.json@@ -41,9 +41,29 @@"openingMessage": "رسالة الافتتاح","openingQuestions": "أسئلة الافتتاح","title": "إعدادات المساعد"+ },+ "version": {+ "empty": "لا توجد إصدارات سابقة",+ "status": {+ "archived": "مؤرشف",+ "deprecated": "مرفوض",+ "unpublished": "قيد المراجعة"+ },+ "table": {+ "isLatest": "أحدث إصدار",+ "isValidated": "تم التحقق منه",+ "publishAt": "تاريخ النشر",+ "version": "رقم الإصدار"+ },+ "title": "سجل الإصدارات"}},"list": "قائمة المساعدين",+ "marketSource": {+ "label": "تبديل مصدر السوق",+ "legacy": "السوق القديم",+ "new": "السوق الجديد"+ },"more": "المزيد","plugins": "دمج الإضافات","recentSubmits": "آخر التحديثات",@@ -51,10 +71,35 @@"createdAt": "تم النشر مؤخراً","identifier": "معرف المساعد","knowledgeCount": "عدد قواعد المعرفة",+ "myown": "عرض مساعدي","pluginCount": "عدد الإضافات","title": "اسم المساعد","tokenUsage": "استهلاك التوكن"},+ "status": {+ "archived": {+ "reasons": {+ "official": "تمت إزالة المساعد من قبل الإدارة لأسباب أمنية أو سياسية",+ "owner": "قام مالك المساعد بإزالته أو أرشفته طوعًا"+ },+ "subtitle": "المساعد الذي تحاول الوصول إليه تم أرشفته للأسباب التالية المحتملة:",+ "title": "تم أرشفة المساعد"+ },+ "backToMarket": "العودة إلى سوق المساعدين",+ "deprecated": {+ "reasons": {+ "official": "تمت إزالة المساعد من قبل الإدارة لأسباب أمنية أو سياسية",+ "owner": "قام مالك المساعد بإزالته أو رفضه طوعًا"+ },+ "subtitle": "المساعد الذي تحاول الوصول إليه تم رفضه للأسباب التالية المحتملة:",+ "title": "تم رفض المساعد"+ },+ "support": "إذا واجهت أي مشاكل، يرجى نسخ الرابط وإرساله إلى <1>[email protected]</1> للاستفسار.",+ "unpublished": {+ "subtitle": "المساعد الذي تحاول الوصول إليه قيد المراجعة حاليًا. إذا كان لديك أي استفسار، يرجى نسخ الرابط وإرساله إلى <1>[email protected]</1>.",+ "title": "المساعد قيد المراجعة"+ }+ },"suggestions": "اقتراحات ذات صلة","systemRole": "إعدادات المساعد","tokenUsage": "استهلاك توكنات تعليمات المساعد",diff --git a/locales/ar/marketAuth.json b/locales/ar/marketAuth.jsonnew file mode 100644index 00000000000..6a2d50d20f2--- /dev/null+++ b/locales/ar/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "إغلاق النافذة"+ },+ "messages": {+ "authFailed": "فشل التفويض: {{error}}",+ "missingParams": "معلمات التفويض مفقودة",+ "processing": "جارٍ معالجة التفويض...",+ "successWithCountdown": "{{message}} سيتم إغلاق النافذة تلقائيًا خلال {{countdown}} ثانية",+ "successWithRedirect": "تم التفويض بنجاح! جارٍ إعادة التوجيه..."+ },+ "titles": {+ "error": "فشل التفويض",+ "loading": "تفويض LobeHub Market",+ "success": "تم التفويض بنجاح"+ }+ },+ "errors": {+ "authorizationFailed": "فشل التفويض، يرجى المحاولة مرة أخرى.",+ "browserOnly": "يمكن بدء عملية التفويض من خلال المتصفح فقط.",+ "codeConsumed": "تم استخدام رمز التفويض، يرجى المحاولة مرة أخرى.",+ "codeVerifierMissing": "جلسة التفويض غير صالحة، يرجى إعادة تسجيل الدخول.",+ "general": "حدث خطأ أثناء التفويض، يرجى المحاولة مرة أخرى.",+ "handoffFailed": "تعذر الحصول على نتيجة التفويض، يرجى المحاولة مرة أخرى.",+ "handoffTimeout": "انتهت مهلة التفويض، يرجى إكمال العملية في المتصفح ثم المحاولة مرة أخرى.",+ "oidcNotReady": "خدمة التفويض غير جاهزة بعد، يرجى المحاولة لاحقًا.",+ "openBrowserFailed": "تعذر فتح متصفح النظام، يرجى المحاولة مرة أخرى.",+ "openPopupFailed": "تعذر فتح نافذة التفويض، يرجى التحقق من إعدادات حظر النوافذ المنبثقة في المتصفح.",+ "popupClosed": "تم إغلاق نافذة التفويض قبل إتمام العملية.",+ "sessionExpired": "انتهت صلاحية جلسة التفويض، يرجى تسجيل الدخول مرة أخرى.",+ "stateMismatch": "حالة التفويض غير متطابقة، يرجى المحاولة مرة أخرى.",+ "stateMissing": "لم يتم العثور على حالة التفويض، يرجى المحاولة مرة أخرى."+ },+ "messages": {+ "loading": "جارٍ بدء عملية التفويض...",+ "success": {+ "submit": "تم التفويض بنجاح! يمكنك الآن نشر المساعد.",+ "upload": "تم التفويض بنجاح! يمكنك الآن نشر إصدار جديد."+ }+ }+}diff --git a/locales/ar/setting.json b/locales/ar/setting.jsonindex 1b8d64cf23b..5a645ab6ba5 100644--- a/locales/ar/setting.json+++ b/locales/ar/setting.json@@ -2,6 +2,45 @@"about": {"title": "حول"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "الصورة الرمزية",+ "description": "الوصف",+ "name": "الاسم",+ "tags": "الوسوم",+ "title": "معلومات المساعد"+ },+ "chat": {+ "displayMode": "وضع العرض",+ "enableHistoryCount": "تمكين عداد الرسائل السابقة",+ "historyCount": "عدد الرسائل السابقة",+ "no": "لا",+ "searchMode": "وضع البحث",+ "title": "تفضيلات الدردشة",+ "yes": "نعم"+ },+ "model": {+ "maxTokens": "الحد الأقصى للرموز",+ "model": "النموذج",+ "provider": "المزود",+ "temperature": "درجة الحرارة",+ "title": "إعدادات النموذج",+ "topP": "قيمة Top P"+ },+ "plugins": {+ "count": "إعدادات الإضافات ({{count}})",+ "empty": "لم يتم تثبيت أي إضافات بعد",+ "title": "الإضافات المثبتة"+ },+ "role": {+ "systemRole": "تعليمات النظام",+ "title": "إعدادات الدور"+ },+ "value": {+ "unset": "غير مُعيّن",+ "untitled": "مساعد بدون عنوان"+ }+ },"agentTab": {"chat": "تفضيلات الدردشة","meta": "معلومات المساعد",@@ -18,6 +57,8 @@},"title": "تحليلات"},+ "checking": "جارٍ التحقق...",+ "checkingPermissions": "جارٍ التحقق من الأذونات...","danger": {"clear": {"action": "مسح الآن",@@ -146,6 +187,58 @@},"waitingForMore": "يتم <1>التخطيط لتوفير</1> المزيد من النماذج، ترقبوا المزيد"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "صف التغييرات والتحسينات الرئيسية في هذا الإصدار",+ "label": "سجل التغييرات",+ "maxLengthError": "لا يمكن أن يتجاوز سجل التغييرات 500 حرف",+ "placeholder": "يرجى إدخال سجل التغييرات",+ "required": "يرجى إدخال سجل التغييرات"+ },+ "comparison": {+ "local": "الإصدار المحلي الحالي",+ "remote": "الإصدار المنشور الحالي"+ },+ "identifier": {+ "extra": "سيكون المعرف هو الهوية الفريدة للمساعد، يُفضل استخدام أحرف صغيرة وأرقام وشرطات",+ "label": "معرف المساعد",+ "lengthError": "يجب أن يتراوح طول المعرف بين 3 و50 حرفًا",+ "patternError": "يمكن أن يحتوي المعرف فقط على أحرف صغيرة وأرقام وشرطات",+ "placeholder": "يرجى إدخال معرف فريد للمساعد، مثل: web-development",+ "required": "يرجى إدخال معرف المساعد"+ },+ "loading": {+ "fetchingRemote": "جارٍ تحميل البيانات البعيدة...",+ "submit": "جارٍ نشر المساعد...",+ "upload": "جارٍ نشر الإصدار الجديد..."+ },+ "messages": {+ "createVersionFailed": "فشل إنشاء الإصدار: {{message}}",+ "fetchRemoteFailed": "فشل في جلب بيانات المساعد من السوق",+ "missingIdentifier": "لا يحتوي هذا المساعد على معرف سوق حتى الآن",+ "notAuthenticated": "يرجى تسجيل الدخول إلى حساب السوق أولاً",+ "publishFailed": "فشل النشر: {{message}}"+ },+ "submitButton": "نشر",+ "title": {+ "submit": "مشاركة في سوق المساعدين",+ "upload": "نشر إصدار جديد"+ }+ },+ "resultModal": {+ "message": "تم إرسال المساعد للمراجعة، وسيتم نشره تلقائيًا بعد الموافقة. انقر على \"عرض في السوق\" لرؤية المساعد المنشور.",+ "view": "عرض في السوق"+ },+ "submit": {+ "button": "مشاركة في السوق",+ "tooltip": "شارك المساعد في سوق المساعدين"+ },+ "upload": {+ "button": "نشر إصدار جديد",+ "tooltip": "نشر إصدار جديد في سوق المساعدين"+ }+ },"message": {"success": "تم التحديث بنجاح"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "تقديم المساعد",- "identifier": "معرف المساعد",+ "identifier": "معرف المساعد (identifier)","metaMiss": "يرجى استكمال معلومات المساعد قبل التقديم، يجب أن تتضمن الاسم والوصف والعلامة","placeholder": "الرجاء إدخال معرف المساعد، يجب أن يكون فريدًا، مثل تطوير الويب","tooltips": "مشاركة في سوق المساعدين"diff --git a/locales/bg-BG/discover.json b/locales/bg-BG/discover.jsonindex a2aa88c7819..107d5365253 100644--- a/locales/bg-BG/discover.json+++ b/locales/bg-BG/discover.json@@ -41,9 +41,29 @@"openingMessage": "Начално съобщение","openingQuestions": "Начални въпроси","title": "Настройки на асистента"+ },+ "version": {+ "empty": "Няма налични предишни версии",+ "status": {+ "archived": "Архивиран",+ "deprecated": "Отхвърлен",+ "unpublished": "В процес на преглед"+ },+ "table": {+ "isLatest": "Последна версия",+ "isValidated": "Потвърдена",+ "publishAt": "Дата на публикуване",+ "version": "Версия"+ },+ "title": "История на версиите"}},"list": "Списък с асистенти",+ "marketSource": {+ "label": "Превключване на източник на пазара",+ "legacy": "Стар пазар",+ "new": "Нов пазар"+ },"more": "Още","plugins": "Интегрирани плъгини","recentSubmits": "Наскоро обновено",@@ -51,10 +71,35 @@"createdAt": "Последно публикуван","identifier": "ID на асистента","knowledgeCount": "Брой бази знания",+ "myown": "Виж моите","pluginCount": "Брой плъгини","title": "Име на асистента","tokenUsage": "Използване на токени"},+ "status": {+ "archived": {+ "reasons": {+ "official": "Асистентът е премахнат от официалните лица поради проблеми със сигурността/политиката",+ "owner": "Собственикът на асистента доброволно го е премахнал/архивирал"+ },+ "subtitle": "Асистентът, който се опитвате да достъпите, е архивиран поради една от следните възможни причини:",+ "title": "Асистентът е архивиран"+ },+ "backToMarket": "Обратно към пазара на асистенти",+ "deprecated": {+ "reasons": {+ "official": "Асистентът е премахнат от официалните лица поради проблеми със сигурността/политиката",+ "owner": "Собственикът на асистента доброволно го е премахнал/отхвърлил"+ },+ "subtitle": "Асистентът, който се опитвате да достъпите, е отхвърлен поради една от следните възможни причини:",+ "title": "Асистентът е отхвърлен"+ },+ "support": "Ако имате въпроси, моля копирайте линка и го изпратете на <1>[email protected]</1> за съдействие.",+ "unpublished": {+ "subtitle": "Асистентът, който се опитвате да достъпите, е в процес на преглед. Ако имате въпроси, копирайте линка и го изпратете на <1>[email protected]</1> за съдействие.",+ "title": "Асистентът е в процес на преглед"+ }+ },"suggestions": "Свързани предложения","systemRole": "Настройки на асистента","tokenUsage": "Използване на токени в подсказките на асистента",diff --git a/locales/bg-BG/marketAuth.json b/locales/bg-BG/marketAuth.jsonnew file mode 100644index 00000000000..68ec1ca1300--- /dev/null+++ b/locales/bg-BG/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Затвори прозореца"+ },+ "messages": {+ "authFailed": "Неуспешно упълномощаване: {{error}}",+ "missingParams": "Липсват параметри за упълномощаване",+ "processing": "Обработва се упълномощаването...",+ "successWithCountdown": "{{message}} Прозорецът ще се затвори автоматично след {{countdown}} секунди",+ "successWithRedirect": "Упълномощаването е успешно! Пренасочване..."+ },+ "titles": {+ "error": "Неуспешно упълномощаване",+ "loading": "Упълномощаване в LobeHub Market",+ "success": "Упълномощаването е успешно"+ }+ },+ "errors": {+ "authorizationFailed": "Упълномощаването не бе успешно, моля опитайте отново.",+ "browserOnly": "Процесът на упълномощаване може да бъде стартиран само в браузър.",+ "codeConsumed": "Кодът за упълномощаване вече е използван, моля опитайте отново.",+ "codeVerifierMissing": "Сесията за упълномощаване е невалидна, моля започнете отново процеса на вход.",+ "general": "Възникна грешка при упълномощаването, моля опитайте отново.",+ "handoffFailed": "Неуспешно получаване на резултат от упълномощаването, моля опитайте отново.",+ "handoffTimeout": "Времето за упълномощаване изтече, моля завършете процеса в браузъра и опитайте отново.",+ "oidcNotReady": "Услугата за упълномощаване все още не е готова, моля опитайте по-късно.",+ "openBrowserFailed": "Неуспешно отваряне на системния браузър, моля опитайте отново.",+ "openPopupFailed": "Неуспешно отваряне на изскачащ прозорец за упълномощаване, моля проверете настройките за блокиране на изскачащи прозорци в браузъра.",+ "popupClosed": "Прозорецът за упълномощаване бе затворен преди завършване на процеса.",+ "sessionExpired": "Сесията за упълномощаване е изтекла, моля влезте отново.",+ "stateMismatch": "Несъответствие в състоянието на упълномощаване, моля опитайте отново.",+ "stateMissing": "Състоянието на упълномощаване не бе намерено, моля опитайте отново."+ },+ "messages": {+ "loading": "Стартиране на процеса по упълномощаване...",+ "success": {+ "submit": "Упълномощаването е успешно! Вече можете да публикувате помощник.",+ "upload": "Упълномощаването е успешно! Вече можете да публикувате нова версия."+ }+ }+}diff --git a/locales/bg-BG/setting.json b/locales/bg-BG/setting.jsonindex b77c4b9d6b7..b295c17b2fb 100644--- a/locales/bg-BG/setting.json+++ b/locales/bg-BG/setting.json@@ -2,6 +2,45 @@"about": {"title": "Относно"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Аватар",+ "description": "Описание",+ "name": "Име",+ "tags": "Етикети",+ "title": "Информация за асистента"+ },+ "chat": {+ "displayMode": "Режим на показване",+ "enableHistoryCount": "Разреши броене на историята",+ "historyCount": "Брой съобщения в историята",+ "no": "Не",+ "searchMode": "Режим на търсене",+ "title": "Предпочитания за чат",+ "yes": "Да"+ },+ "model": {+ "maxTokens": "Максимален брой токени",+ "model": "Модел",+ "provider": "Доставчик",+ "temperature": "Температура",+ "title": "Настройки на модела",+ "topP": "Стойност на Top P"+ },+ "plugins": {+ "count": "Настройки на плъгини ({{count}})",+ "empty": "Все още няма инсталирани плъгини",+ "title": "Инсталирани плъгини"+ },+ "role": {+ "systemRole": "Системна подсказка",+ "title": "Настройки на роля"+ },+ "value": {+ "unset": "Не е зададено",+ "untitled": "Безименен асистент"+ }+ },"agentTab": {"chat": "Предпочитания за чат","meta": "Информация за асистента",@@ -18,6 +57,8 @@},"title": "Анализи"},+ "checking": "Проверка...",+ "checkingPermissions": "Проверка на разрешения...","danger": {"clear": {"action": "Изчисти сега",@@ -146,6 +187,58 @@},"waitingForMore": "Още модели са <1>планирани да бъдат добавени</1>, очаквайте"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Опишете основните промени и подобрения в тази версия",+ "label": "Дневник на промените",+ "maxLengthError": "Дневникът на промените не може да надвишава 500 знака",+ "placeholder": "Моля, въведете дневник на промените",+ "required": "Моля, въведете дневник на промените"+ },+ "comparison": {+ "local": "Текуща локална версия",+ "remote": "Текуща публикувана версия"+ },+ "identifier": {+ "extra": "Идентификаторът ще бъде уникален за асистента. Препоръчва се използване на малки букви, цифри и тирета",+ "label": "Идентификатор на асистента",+ "lengthError": "Дължината на идентификатора трябва да е между 3 и 50 знака",+ "patternError": "Идентификаторът може да съдържа само малки букви, цифри и тирета",+ "placeholder": "Моля, въведете уникален идентификатор, напр.: web-development",+ "required": "Моля, въведете идентификатор на асистента"+ },+ "loading": {+ "fetchingRemote": "Зареждане на отдалечени данни...",+ "submit": "Публикуване на асистента...",+ "upload": "Публикуване на нова версия..."+ },+ "messages": {+ "createVersionFailed": "Неуспешно създаване на версия: {{message}}",+ "fetchRemoteFailed": "Неуспешно извличане на отдалечени данни за асистента",+ "missingIdentifier": "Текущият асистент няма идентификатор за пазара",+ "notAuthenticated": "Моля, влезте в акаунта си в пазара",+ "publishFailed": "Публикуването не бе успешно: {{message}}"+ },+ "submitButton": "Публикувай",+ "title": {+ "submit": "Сподели в пазара за асистенти",+ "upload": "Публикувай нова версия"+ }+ },+ "resultModal": {+ "message": "Асистентът е изпратен за преглед. След одобрение ще бъде автоматично публикуван. Кликнете върху „Преглед в пазара“, за да видите публикувания асистент.",+ "view": "Преглед в пазара"+ },+ "submit": {+ "button": "Сподели в пазара",+ "tooltip": "Сподели асистента в пазара"+ },+ "upload": {+ "button": "Публикувай нова версия",+ "tooltip": "Публикувай нова версия в пазара за асистенти"+ }+ },"message": {"success": "Актуализацията беше успешна"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Изпрати агент",- "identifier": "Идентификатор на агент",+ "identifier": "Идентификатор на асистента (identifier)","metaMiss": "Моля, попълнете информацията за агента, преди да го изпратите. Тя трябва да включва име, описание и тагове","placeholder": "Въведете уникален идентификатор за агента, напр. web-development","tooltips": "Споделяне на пазара на агенти"diff --git a/locales/de-DE/discover.json b/locales/de-DE/discover.jsonindex 4a2d37db503..fa30b796eff 100644--- a/locales/de-DE/discover.json+++ b/locales/de-DE/discover.json@@ -41,9 +41,29 @@"openingMessage": "Eröffnungsnachricht","openingQuestions": "Eröffnungsfragen","title": "Assistenteneinstellungen"+ },+ "version": {+ "empty": "Keine früheren Versionen verfügbar",+ "status": {+ "archived": "Archiviert",+ "deprecated": "Abgelehnt",+ "unpublished": "In Überprüfung"+ },+ "table": {+ "isLatest": "Neueste Version",+ "isValidated": "Verifiziert",+ "publishAt": "Veröffentlichungsdatum",+ "version": "Versionsnummer"+ },+ "title": "Versionsverlauf"}},"list": "Assistentenliste",+ "marketSource": {+ "label": "Marktquelle wechseln",+ "legacy": "Alter Markt",+ "new": "Neuer Markt"+ },"more": "Mehr","plugins": "Integrations-Plugins","recentSubmits": "Neueste Aktualisierungen",@@ -51,10 +71,35 @@"createdAt": "Zuletzt veröffentlicht","identifier": "Assistenten-ID","knowledgeCount": "Anzahl der Wissensdatenbanken",+ "myown": "Meine anzeigen","pluginCount": "Anzahl der Plugins","title": "Assistentenname","tokenUsage": "Token-Verbrauch"},+ "status": {+ "archived": {+ "reasons": {+ "official": "Der Assistent wurde aufgrund von Sicherheits- oder politischen Problemen offiziell entfernt.",+ "owner": "Der Entwickler des Assistenten hat ihn freiwillig entfernt oder archiviert."+ },+ "subtitle": "Der aktuell aufgerufene Assistent wurde aus einem der folgenden Gründe archiviert:",+ "title": "Assistent archiviert"+ },+ "backToMarket": "Zurück zum Assistenten-Markt",+ "deprecated": {+ "reasons": {+ "official": "Der Assistent wurde aufgrund von Sicherheits- oder politischen Problemen offiziell entfernt.",+ "owner": "Der Entwickler des Assistenten hat ihn freiwillig entfernt oder abgelehnt."+ },+ "subtitle": "Der aktuell aufgerufene Assistent wurde aus einem der folgenden Gründe abgelehnt:",+ "title": "Assistent abgelehnt"+ },+ "support": "Bei Fragen senden Sie bitte den Link an <1>[email protected]</1>.",+ "unpublished": {+ "subtitle": "Der aktuell aufgerufene Assistent befindet sich in der Versionsprüfung. Bei Fragen senden Sie bitte den Link an <1>[email protected]</1>.",+ "title": "Assistent in Überprüfung"+ }+ },"suggestions": "Ähnliche Empfehlungen","systemRole": "Assistenteneinstellungen","tokenUsage": "Token-Verbrauch der Assistenten-Prompt",diff --git a/locales/de-DE/marketAuth.json b/locales/de-DE/marketAuth.jsonnew file mode 100644index 00000000000..4b08ce9b391--- /dev/null+++ b/locales/de-DE/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Fenster schließen"+ },+ "messages": {+ "authFailed": "Autorisierung fehlgeschlagen: {{error}}",+ "missingParams": "Autorisierungsparameter fehlen",+ "processing": "Autorisierung wird verarbeitet...",+ "successWithCountdown": "{{message}} Das Fenster wird in {{countdown}} Sekunden automatisch geschlossen",+ "successWithRedirect": "Autorisierung erfolgreich! Weiterleitung läuft..."+ },+ "titles": {+ "error": "Autorisierung fehlgeschlagen",+ "loading": "LobeHub Market Autorisierung",+ "success": "Autorisierung erfolgreich"+ }+ },+ "errors": {+ "authorizationFailed": "Autorisierung fehlgeschlagen, bitte erneut versuchen.",+ "browserOnly": "Der Autorisierungsvorgang kann nur im Browser gestartet werden.",+ "codeConsumed": "Autorisierungscode wurde bereits verwendet, bitte erneut versuchen.",+ "codeVerifierMissing": "Autorisierungssitzung ungültig, bitte den Anmeldevorgang erneut starten.",+ "general": "Ein Fehler ist bei der Autorisierung aufgetreten, bitte erneut versuchen.",+ "handoffFailed": "Autorisierungsergebnis konnte nicht abgerufen werden, bitte erneut versuchen.",+ "handoffTimeout": "Autorisierung zeitüberschritten, bitte nach Abschluss im Browser erneut versuchen.",+ "oidcNotReady": "Autorisierungsdienst ist noch nicht bereit, bitte später erneut versuchen.",+ "openBrowserFailed": "Systembrowser konnte nicht geöffnet werden, bitte erneut versuchen.",+ "openPopupFailed": "Autorisierungs-Popup konnte nicht geöffnet werden, bitte die Popup-Blocker-Einstellungen im Browser überprüfen.",+ "popupClosed": "Autorisierungsfenster wurde geschlossen, bevor der Vorgang abgeschlossen war.",+ "sessionExpired": "Autorisierungssitzung ist abgelaufen, bitte erneut anmelden.",+ "stateMismatch": "Autorisierungsstatus stimmt nicht überein, bitte erneut versuchen.",+ "stateMissing": "Autorisierungsstatus nicht gefunden, bitte erneut versuchen."+ },+ "messages": {+ "loading": "Autorisierungsvorgang wird gestartet...",+ "success": {+ "submit": "Autorisierung erfolgreich! Du kannst jetzt einen Assistenten veröffentlichen.",+ "upload": "Autorisierung erfolgreich! Du kannst jetzt eine neue Version veröffentlichen."+ }+ }+}diff --git a/locales/de-DE/setting.json b/locales/de-DE/setting.jsonindex 4a2b2200a50..34784980001 100644--- a/locales/de-DE/setting.json+++ b/locales/de-DE/setting.json@@ -2,6 +2,45 @@"about": {"title": "Über"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Profilbild",+ "description": "Beschreibung",+ "name": "Name",+ "tags": "Stichworte",+ "title": "Assistenteninformationen"+ },+ "chat": {+ "displayMode": "Anzeigemodus",+ "enableHistoryCount": "Anzahl vergangener Nachrichten aktivieren",+ "historyCount": "Anzahl vergangener Nachrichten",+ "no": "Nein",+ "searchMode": "Suchmodus",+ "title": "Chat-Einstellungen",+ "yes": "Ja"+ },+ "model": {+ "maxTokens": "Maximale Token-Anzahl",+ "model": "Modell",+ "provider": "Anbieter",+ "temperature": "Temperatur",+ "title": "Modelleinstellungen",+ "topP": "Top-P-Wert"+ },+ "plugins": {+ "count": "Plugin-Einstellungen ({{count}})",+ "empty": "Noch keine Plugins installiert",+ "title": "Installierte Plugins"+ },+ "role": {+ "systemRole": "System-Prompt",+ "title": "Rollen-Einstellungen"+ },+ "value": {+ "unset": "Nicht festgelegt",+ "untitled": "Unbenannter Assistent"+ }+ },"agentTab": {"chat": "Chat-Präferenz","meta": "Assistenteninformation",@@ -18,6 +57,8 @@},"title": "Analytics"},+ "checking": "Überprüfung läuft...",+ "checkingPermissions": "Berechtigungen werden überprüft...","danger": {"clear": {"action": "Alle löschen",@@ -146,6 +187,58 @@},"waitingForMore": "Weitere Modelle werden <1>geplant</1>, bitte freuen Sie sich auf weitere Updates"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Beschreiben Sie die wichtigsten Änderungen und Verbesserungen in dieser Version",+ "label": "Änderungsprotokoll",+ "maxLengthError": "Das Änderungsprotokoll darf maximal 500 Zeichen enthalten",+ "placeholder": "Bitte geben Sie das Änderungsprotokoll ein",+ "required": "Bitte geben Sie das Änderungsprotokoll ein"+ },+ "comparison": {+ "local": "Lokale aktuelle Version",+ "remote": "Veröffentlichte Version"+ },+ "identifier": {+ "extra": "Der Bezeichner dient als eindeutige Kennung des Assistenten. Verwenden Sie Kleinbuchstaben, Zahlen und Bindestriche.",+ "label": "Assistenten-Bezeichner",+ "lengthError": "Die Länge des Bezeichners muss zwischen 3 und 50 Zeichen liegen",+ "patternError": "Der Bezeichner darf nur Kleinbuchstaben, Zahlen und Bindestriche enthalten",+ "placeholder": "Bitte geben Sie einen eindeutigen Bezeichner ein, z. B.: web-entwicklung",+ "required": "Bitte geben Sie den Bezeichner des Assistenten ein"+ },+ "loading": {+ "fetchingRemote": "Lade entfernte Daten...",+ "submit": "Assistent wird veröffentlicht...",+ "upload": "Neue Version wird veröffentlicht..."+ },+ "messages": {+ "createVersionFailed": "Versionserstellung fehlgeschlagen: {{message}}",+ "fetchRemoteFailed": "Fehler beim Abrufen der entfernten Assistentendaten",+ "missingIdentifier": "Der aktuelle Assistent hat noch keinen Markt-Bezeichner",+ "notAuthenticated": "Bitte melden Sie sich zuerst mit Ihrem Marktkonto an",+ "publishFailed": "Veröffentlichung fehlgeschlagen: {{message}}"+ },+ "submitButton": "Veröffentlichen",+ "title": {+ "submit": "Im Assistenten-Markt teilen",+ "upload": "Neue Version veröffentlichen"+ }+ },+ "resultModal": {+ "message": "Der Assistent wurde zur Überprüfung eingereicht. Nach erfolgreicher Prüfung wird er automatisch veröffentlicht. Klicken Sie auf „Im Markt ansehen“, um den veröffentlichten Assistenten zu sehen.",+ "view": "Im Markt ansehen"+ },+ "submit": {+ "button": "Im Markt teilen",+ "tooltip": "Assistent im Markt veröffentlichen"+ },+ "upload": {+ "button": "Neue Version veröffentlichen",+ "tooltip": "Neue Version im Assistenten-Markt veröffentlichen"+ }+ },"message": {"success": "Erfolgreich aktualisiert"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Assistent einreichen",- "identifier": "Assistenten-Kennung",+ "identifier": "Assistenten-Bezeichner (identifier)","metaMiss": "Bitte vervollständigen Sie die Assistenteninformationen, einschließlich Name, Beschreibung und Tags, bevor Sie sie einreichen.","placeholder": "Geben Sie die Kennung des Assistenten ein, die eindeutig sein muss, z. B. Web-Entwicklung","tooltips": "Auf dem Assistentenmarkt teilen"diff --git a/locales/en-US/discover.json b/locales/en-US/discover.jsonindex a5b4251b6fa..3816b009b53 100644--- a/locales/en-US/discover.json+++ b/locales/en-US/discover.json@@ -41,9 +41,29 @@"openingMessage": "Opening Message","openingQuestions": "Opening Questions","title": "Assistant Settings"+ },+ "version": {+ "empty": "No historical versions yet",+ "status": {+ "archived": "Archived",+ "deprecated": "Deprecated",+ "unpublished": "Under Review"+ },+ "table": {+ "isLatest": "Latest Version",+ "isValidated": "Validated",+ "publishAt": "Published Date",+ "version": "Version"+ },+ "title": "Version History"}},"list": "Assistant List",+ "marketSource": {+ "label": "Market Source",+ "legacy": "Legacy",+ "new": "New"+ },"more": "More","plugins": "Integrated Plugins","recentSubmits": "Recent Updates",@@ -51,10 +71,35 @@"createdAt": "Recently Published","identifier": "Assistant ID","knowledgeCount": "Number of Knowledge Bases",+ "myown": "View My Assistants","pluginCount": "Number of Plugins","title": "Assistant Name","tokenUsage": "Token Usage"},+ "status": {+ "archived": {+ "reasons": {+ "official": "The assistant was removed by the platform due to security, political, or other concerns.",+ "owner": "The assistant was voluntarily removed or archived by its developer."+ },+ "subtitle": "The assistant you're trying to access has been archived for one of the following reasons:",+ "title": "Assistant Archived"+ },+ "backToMarket": "Back to Assistant Marketplace",+ "deprecated": {+ "reasons": {+ "official": "The assistant was removed by the platform due to security, political, or other concerns.",+ "owner": "The assistant was voluntarily removed or rejected by its developer."+ },+ "subtitle": "The assistant you're trying to access has been rejected for one of the following reasons:",+ "title": "Assistant Rejected"+ },+ "support": "If you have any questions, please copy the link and contact us at <1>[email protected]</1>.",+ "unpublished": {+ "subtitle": "The assistant you're trying to access is currently under review. If you have any questions, please copy the link and contact us at <1>[email protected]</1>.",+ "title": "Assistant Under Review"+ }+ },"suggestions": "Related Recommendations","systemRole": "Assistant Settings","tokenUsage": "Assistant Prompt Token Usage",diff --git a/locales/en-US/marketAuth.json b/locales/en-US/marketAuth.jsonnew file mode 100644index 00000000000..34f5d2560a1--- /dev/null+++ b/locales/en-US/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Close Window"+ },+ "messages": {+ "authFailed": "Authorization failed: {{error}}",+ "missingParams": "Missing authorization parameters",+ "processing": "Processing authorization...",+ "successWithCountdown": "{{message}} The window will close automatically in {{countdown}} seconds",+ "successWithRedirect": "Authorization successful! Redirecting..."+ },+ "titles": {+ "error": "Authorization Failed",+ "loading": "LobeHub Market Authorization",+ "success": "Authorization Successful"+ }+ },+ "errors": {+ "authorizationFailed": "Authorization failed, please try again.",+ "browserOnly": "The authorization process can only be initiated in a browser.",+ "codeConsumed": "The authorization code has already been used. Please try again.",+ "codeVerifierMissing": "Invalid authorization session. Please restart the login process.",+ "general": "An error occurred during authorization. Please try again.",+ "handoffFailed": "Failed to retrieve authorization result. Please try again.",+ "handoffTimeout": "Authorization timed out. Please complete the process in your browser and try again.",+ "oidcNotReady": "Authorization service is not ready. Please try again later.",+ "openBrowserFailed": "Failed to open the system browser. Please try again.",+ "openPopupFailed": "Failed to open authorization popup. Please check your browser's popup blocker settings.",+ "popupClosed": "The authorization window was closed before completion.",+ "sessionExpired": "Authorization session has expired. Please log in again.",+ "stateMismatch": "Authorization state mismatch. Please try again.",+ "stateMissing": "Authorization state not found. Please try again."+ },+ "messages": {+ "loading": "Starting authorization process...",+ "success": {+ "submit": "Authorization successful! You can now publish your assistant.",+ "upload": "Authorization successful! You can now publish a new version."+ }+ }+}diff --git a/locales/en-US/setting.json b/locales/en-US/setting.jsonindex 76fd0b25f1b..1353775f5e7 100644--- a/locales/en-US/setting.json+++ b/locales/en-US/setting.json@@ -2,6 +2,45 @@"about": {"title": "About"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Avatar",+ "description": "Description",+ "name": "Name",+ "tags": "Tags",+ "title": "Agent Info"+ },+ "chat": {+ "displayMode": "Display Mode",+ "enableHistoryCount": "Enable Message History Count",+ "historyCount": "Message History Count",+ "no": "No",+ "searchMode": "Search Mode",+ "title": "Chat Preferences",+ "yes": "Yes"+ },+ "model": {+ "maxTokens": "Max Token Count",+ "model": "Model",+ "provider": "Provider",+ "temperature": "Temperature",+ "title": "Model Settings",+ "topP": "Top P Value"+ },+ "plugins": {+ "count": "Plugin Settings ({{count}})",+ "empty": "No plugins installed yet",+ "title": "Installed Plugins"+ },+ "role": {+ "systemRole": "System Prompt",+ "title": "Role Settings"+ },+ "value": {+ "unset": "Not Set",+ "untitled": "Untitled Agent"+ }+ },"agentTab": {"chat": "Chat Preferences","meta": "Assistant Info",@@ -18,6 +57,8 @@},"title": "Analytics"},+ "checking": "Checking...",+ "checkingPermissions": "Checking permissions...","danger": {"clear": {"action": "Clear Now",@@ -146,6 +187,58 @@},"waitingForMore": "More models are <1>planned to be added</1>, stay tuned"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Describe the key changes and improvements in this version",+ "label": "Changelog",+ "maxLengthError": "Changelog must not exceed 500 characters",+ "placeholder": "Enter the changelog",+ "required": "Please enter the changelog"+ },+ "comparison": {+ "local": "Current Local Version",+ "remote": "Currently Published Version"+ },+ "identifier": {+ "extra": "The identifier serves as the unique ID for the agent. Use lowercase letters, numbers, and hyphens.",+ "label": "Agent Identifier",+ "lengthError": "Identifier must be between 3 and 50 characters",+ "patternError": "Identifier can only contain lowercase letters, numbers, and hyphens",+ "placeholder": "Enter a unique identifier for the agent, e.g., web-development",+ "required": "Please enter the agent identifier"+ },+ "loading": {+ "fetchingRemote": "Loading remote data...",+ "submit": "Publishing agent...",+ "upload": "Publishing new version..."+ },+ "messages": {+ "createVersionFailed": "Failed to create version: {{message}}",+ "fetchRemoteFailed": "Failed to fetch remote agent data",+ "missingIdentifier": "This agent does not have a market identifier yet",+ "notAuthenticated": "Please log in to your market account first",+ "publishFailed": "Publish failed: {{message}}"+ },+ "submitButton": "Publish",+ "title": {+ "submit": "Share to Agent Market",+ "upload": "Publish New Version"+ }+ },+ "resultModal": {+ "message": "The agent has been submitted for review. It will go live automatically once approved. Click 'View in Market' to see the published agent.",+ "view": "View in Market"+ },+ "submit": {+ "button": "Share to Market",+ "tooltip": "Share the agent to the market"+ },+ "upload": {+ "button": "Publish New Version",+ "tooltip": "Publish a new version to the agent market"+ }+ },"message": {"success": "Update successful"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Submit Assistant",- "identifier": "Assistant Identifier",+ "identifier": "Agent Identifier","metaMiss": "Please complete the assistant information before submitting. It should include name, description, and tags","placeholder": "Enter a unique identifier for the assistant, e.g. web-development","tooltips": "Share to the assistant marketplace"diff --git a/locales/es-ES/discover.json b/locales/es-ES/discover.jsonindex ad56c257291..258860bfe1d 100644--- a/locales/es-ES/discover.json+++ b/locales/es-ES/discover.json@@ -41,9 +41,29 @@"openingMessage": "Mensaje de apertura","openingQuestions": "Preguntas iniciales","title": "Configuración del Asistente"+ },+ "version": {+ "empty": "No hay versiones históricas",+ "status": {+ "archived": "Archivado",+ "deprecated": "Rechazado",+ "unpublished": "En revisión"+ },+ "table": {+ "isLatest": "Última versión",+ "isValidated": "Validado",+ "publishAt": "Fecha de publicación",+ "version": "Número de versión"+ },+ "title": "Historial de versiones"}},"list": "Lista de asistentes",+ "marketSource": {+ "label": "Cambiar fuente del mercado",+ "legacy": "Mercado antiguo",+ "new": "Nuevo mercado"+ },"more": "Más","plugins": "Integrar complementos","recentSubmits": "Actualizaciones recientes",@@ -51,10 +71,35 @@"createdAt": "Publicado recientemente","identifier": "ID del Asistente","knowledgeCount": "Cantidad de bases de conocimiento",+ "myown": "Ver mis asistentes","pluginCount": "Cantidad de complementos","title": "Nombre del Asistente","tokenUsage": "Uso de Tokens"},+ "status": {+ "archived": {+ "reasons": {+ "official": "El asistente fue retirado por problemas de seguridad/política por parte del equipo oficial",+ "owner": "El propietario del asistente lo retiró o archivó voluntariamente"+ },+ "subtitle": "El asistente al que estás accediendo ha sido archivado por una de las siguientes razones:",+ "title": "Asistente archivado"+ },+ "backToMarket": "Volver al mercado de asistentes",+ "deprecated": {+ "reasons": {+ "official": "El asistente fue retirado por problemas de seguridad/política por parte del equipo oficial",+ "owner": "El propietario del asistente lo retiró o rechazó voluntariamente"+ },+ "subtitle": "El asistente al que estás accediendo ha sido rechazado por una de las siguientes razones:",+ "title": "Asistente rechazado"+ },+ "support": "Si tienes algún problema, copia el enlace y envíalo a <1>[email protected]</1> para recibir asistencia.",+ "unpublished": {+ "subtitle": "El asistente al que estás accediendo está en proceso de revisión. Si tienes dudas, copia el enlace y envía tu consulta a <1>[email protected]</1>.",+ "title": "Asistente en revisión"+ }+ },"suggestions": "Recomendaciones relacionadas","systemRole": "Configuración del asistente","tokenUsage": "Uso de Tokens en el prompt del asistente",diff --git a/locales/es-ES/marketAuth.json b/locales/es-ES/marketAuth.jsonnew file mode 100644index 00000000000..7c5b0916e43--- /dev/null+++ b/locales/es-ES/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Cerrar ventana"+ },+ "messages": {+ "authFailed": "Autenticación fallida: {{error}}",+ "missingParams": "Faltan parámetros de autenticación",+ "processing": "Procesando autenticación...",+ "successWithCountdown": "{{message}} La ventana se cerrará automáticamente en {{countdown}} segundos",+ "successWithRedirect": "¡Autenticación exitosa! Redirigiendo..."+ },+ "titles": {+ "error": "Error de autenticación",+ "loading": "Autenticación de LobeHub Market",+ "success": "Autenticación exitosa"+ }+ },+ "errors": {+ "authorizationFailed": "La autenticación ha fallado, por favor inténtalo de nuevo.",+ "browserOnly": "El proceso de autenticación solo puede iniciarse en un navegador.",+ "codeConsumed": "El código de autenticación ya ha sido utilizado, por favor inténtalo de nuevo.",+ "codeVerifierMissing": "Sesión de autenticación no válida, por favor inicia sesión nuevamente.",+ "general": "Se produjo un error durante la autenticación, por favor inténtalo de nuevo.",+ "handoffFailed": "No se pudo obtener el resultado de la autenticación, por favor inténtalo de nuevo.",+ "handoffTimeout": "Tiempo de espera de autenticación agotado, por favor completa la operación en el navegador e inténtalo de nuevo.",+ "oidcNotReady": "El servicio de autenticación aún no está listo, por favor inténtalo más tarde.",+ "openBrowserFailed": "No se pudo abrir el navegador del sistema, por favor inténtalo de nuevo.",+ "openPopupFailed": "No se pudo abrir la ventana emergente de autenticación, por favor revisa la configuración del bloqueador de ventanas emergentes del navegador.",+ "popupClosed": "La ventana de autenticación se cerró antes de completarse.",+ "sessionExpired": "La sesión de autenticación ha expirado, por favor inicia sesión nuevamente.",+ "stateMismatch": "Estado de autenticación no coincide, por favor inténtalo de nuevo.",+ "stateMissing": "No se encontró el estado de autenticación, por favor inténtalo de nuevo."+ },+ "messages": {+ "loading": "Iniciando el proceso de autenticación...",+ "success": {+ "submit": "¡Autenticación exitosa! Ahora puedes publicar asistentes.",+ "upload": "¡Autenticación exitosa! Ahora puedes publicar una nueva versión."+ }+ }+}diff --git a/locales/es-ES/setting.json b/locales/es-ES/setting.jsonindex 1cbcf163159..d83b066dfb5 100644--- a/locales/es-ES/setting.json+++ b/locales/es-ES/setting.json@@ -2,6 +2,45 @@"about": {"title": "Acerca de"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Avatar",+ "description": "Descripción",+ "name": "Nombre",+ "tags": "Etiquetas",+ "title": "Información del Asistente"+ },+ "chat": {+ "displayMode": "Modo de visualización",+ "enableHistoryCount": "Habilitar conteo de mensajes históricos",+ "historyCount": "Cantidad de mensajes históricos",+ "no": "No",+ "searchMode": "Modo de búsqueda",+ "title": "Preferencias de chat",+ "yes": "Sí"+ },+ "model": {+ "maxTokens": "Máximo de tokens",+ "model": "Modelo",+ "provider": "Proveedor",+ "temperature": "Temperatura",+ "title": "Configuración del modelo",+ "topP": "Valor Top P"+ },+ "plugins": {+ "count": "Configuración de plugins ({{count}})",+ "empty": "Aún no se han instalado plugins",+ "title": "Plugins instalados"+ },+ "role": {+ "systemRole": "Mensaje del sistema",+ "title": "Configuración de rol"+ },+ "value": {+ "unset": "No configurado",+ "untitled": "Asistente sin título"+ }+ },"agentTab": {"chat": "Preferencias de chat","meta": "Información del asistente",@@ -18,6 +57,8 @@},"title": "Análisis de datos"},+ "checking": "Comprobando...",+ "checkingPermissions": "Verificando permisos...","danger": {"clear": {"action": "Limpiar ahora",@@ -146,6 +187,58 @@},"waitingForMore": "Más modelos están en <1>planificación para su incorporación</1>, ¡estén atentos!"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Describe los principales cambios y mejoras de esta versión",+ "label": "Registro de cambios",+ "maxLengthError": "El registro de cambios no puede superar los 500 caracteres",+ "placeholder": "Introduce el registro de cambios",+ "required": "Por favor, introduce el registro de cambios"+ },+ "comparison": {+ "local": "Versión local actual",+ "remote": "Versión publicada actual"+ },+ "identifier": {+ "extra": "El identificador será único para el asistente. Se recomienda usar letras minúsculas, números y guiones",+ "label": "Identificador del asistente",+ "lengthError": "La longitud del identificador debe estar entre 3 y 50 caracteres",+ "patternError": "El identificador solo puede contener letras minúsculas, números y guiones",+ "placeholder": "Introduce un identificador único para el asistente, por ejemplo: desarrollo-web",+ "required": "Por favor, introduce el identificador del asistente"+ },+ "loading": {+ "fetchingRemote": "Cargando datos remotos...",+ "submit": "Publicando asistente...",+ "upload": "Publicando nueva versión..."+ },+ "messages": {+ "createVersionFailed": "Error al crear la versión: {{message}}",+ "fetchRemoteFailed": "Error al obtener los datos del asistente remoto",+ "missingIdentifier": "El asistente actual no tiene un identificador de mercado",+ "notAuthenticated": "Por favor, inicia sesión en tu cuenta del mercado",+ "publishFailed": "Error al publicar: {{message}}"+ },+ "submitButton": "Publicar",+ "title": {+ "submit": "Compartir en el mercado de asistentes",+ "upload": "Publicar nueva versión"+ }+ },+ "resultModal": {+ "message": "El asistente ha sido enviado para revisión. Una vez aprobado, se publicará automáticamente. Haz clic en «Ver en el mercado» para ver el asistente publicado.",+ "view": "Ver en el mercado"+ },+ "submit": {+ "button": "Compartir en el mercado",+ "tooltip": "Comparte el asistente en el mercado"+ },+ "upload": {+ "button": "Publicar nueva versión",+ "tooltip": "Publica una nueva versión en el mercado de asistentes"+ }+ },"message": {"success": "Actualización exitosa"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Enviar asistente",- "identifier": "Identificador del asistente",+ "identifier": "Identificador del asistente (identifier)","metaMiss": "Por favor complete la información del asistente antes de enviar, debe incluir nombre, descripción y etiquetas","placeholder": "Ingrese el identificador único del asistente, por ejemplo desarrollo-web","tooltips": "Compartir en el mercado de asistentes"diff --git a/locales/fa-IR/discover.json b/locales/fa-IR/discover.jsonindex c4d9dd750bb..cd52ca42610 100644--- a/locales/fa-IR/discover.json+++ b/locales/fa-IR/discover.json@@ -41,9 +41,29 @@"openingMessage": "پیام آغازین","openingQuestions": "سوالات آغازین","title": "تنظیمات دستیار"+ },+ "version": {+ "empty": "هیچ نسخهای در دسترس نیست",+ "status": {+ "archived": "بایگانی شده",+ "deprecated": "رد شده",+ "unpublished": "در حال بررسی"+ },+ "table": {+ "isLatest": "آخرین نسخه",+ "isValidated": "تأیید شده",+ "publishAt": "تاریخ انتشار",+ "version": "شماره نسخه"+ },+ "title": "تاریخچه نسخهها"}},"list": "فهرست دستیاران",+ "marketSource": {+ "label": "تغییر منبع بازار",+ "legacy": "بازار قدیمی",+ "new": "بازار جدید"+ },"more": "بیشتر","plugins": "افزونههای یکپارچه","recentSubmits": "آخرین بهروزرسانیها",@@ -51,10 +71,35 @@"createdAt": "تازهترین انتشار","identifier": "شناسه دستیار","knowledgeCount": "تعداد پایگاههای دانش",+ "myown": "مشاهده دستیارهای من","pluginCount": "تعداد افزونهها","title": "نام دستیار","tokenUsage": "میزان استفاده از توکن"},+ "status": {+ "archived": {+ "reasons": {+ "official": "به دلیل مسائل امنیتی/سیاسی توسط تیم رسمی از دسترس خارج شده است",+ "owner": "مالک توسعهدهنده دستیار بهصورت داوطلبانه آن را از دسترس خارج یا بایگانی کرده است"+ },+ "subtitle": "دستیار مورد نظر به دلایل زیر ممکن است بایگانی شده باشد:",+ "title": "دستیار بایگانی شده است"+ },+ "backToMarket": "بازگشت به بازار دستیارها",+ "deprecated": {+ "reasons": {+ "official": "به دلیل مسائل امنیتی/سیاسی توسط تیم رسمی از دسترس خارج شده است",+ "owner": "مالک توسعهدهنده دستیار بهصورت داوطلبانه آن را رد یا از دسترس خارج کرده است"+ },+ "subtitle": "دستیار مورد نظر به دلایل زیر ممکن است رد شده باشد:",+ "title": "دستیار رد شده است"+ },+ "support": "در صورت وجود هرگونه مشکل، لطفاً لینک را کپی کرده و به <1>[email protected]</1> ارسال نمایید.",+ "unpublished": {+ "subtitle": "دستیار مورد نظر در حال بررسی نسخه است. در صورت وجود سوال، لینک را کپی کرده و به <1>[email protected]</1> ارسال نمایید.",+ "title": "دستیار در حال بررسی است"+ }+ },"suggestions": "پیشنهادات مرتبط","systemRole": "تنظیمات دستیار","tokenUsage": "میزان استفاده از توکنهای راهنمای دستیار",diff --git a/locales/fa-IR/marketAuth.json b/locales/fa-IR/marketAuth.jsonnew file mode 100644index 00000000000..963a209f87f--- /dev/null+++ b/locales/fa-IR/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "بستن پنجره"+ },+ "messages": {+ "authFailed": "احراز هویت ناموفق: {{error}}",+ "missingParams": "پارامترهای احراز هویت ناقص هستند",+ "processing": "در حال پردازش احراز هویت...",+ "successWithCountdown": "{{message}} پنجره در {{countdown}} ثانیه دیگر بهطور خودکار بسته خواهد شد",+ "successWithRedirect": "احراز هویت با موفقیت انجام شد! در حال انتقال..."+ },+ "titles": {+ "error": "احراز هویت ناموفق",+ "loading": "احراز هویت LobeHub Market",+ "success": "احراز هویت موفق"+ }+ },+ "errors": {+ "authorizationFailed": "احراز هویت ناموفق بود، لطفاً دوباره تلاش کنید.",+ "browserOnly": "فرآیند احراز هویت فقط در مرورگر قابل انجام است.",+ "codeConsumed": "کد احراز هویت قبلاً استفاده شده است، لطفاً دوباره تلاش کنید.",+ "codeVerifierMissing": "نشست احراز هویت نامعتبر است، لطفاً دوباره وارد شوید.",+ "general": "خطایی در احراز هویت رخ داد، لطفاً دوباره تلاش کنید.",+ "handoffFailed": "دریافت نتیجه احراز هویت ناموفق بود، لطفاً دوباره تلاش کنید.",+ "handoffTimeout": "مهلت احراز هویت به پایان رسید، لطفاً پس از تکمیل عملیات در مرورگر دوباره تلاش کنید.",+ "oidcNotReady": "سرویس احراز هویت هنوز آماده نیست، لطفاً بعداً دوباره تلاش کنید.",+ "openBrowserFailed": "امکان باز کردن مرورگر سیستم وجود ندارد، لطفاً دوباره تلاش کنید.",+ "openPopupFailed": "امکان باز کردن پنجره احراز هویت وجود ندارد، لطفاً تنظیمات مسدودکننده پنجره مرورگر را بررسی کنید.",+ "popupClosed": "پنجره احراز هویت قبل از تکمیل بسته شد.",+ "sessionExpired": "نشست احراز هویت منقضی شده است، لطفاً دوباره وارد شوید.",+ "stateMismatch": "وضعیت احراز هویت مطابقت ندارد، لطفاً دوباره تلاش کنید.",+ "stateMissing": "وضعیت احراز هویت یافت نشد، لطفاً دوباره تلاش کنید."+ },+ "messages": {+ "loading": "در حال آغاز فرآیند احراز هویت...",+ "success": {+ "submit": "احراز هویت با موفقیت انجام شد! اکنون میتوانید دستیار را منتشر کنید.",+ "upload": "احراز هویت با موفقیت انجام شد! اکنون میتوانید نسخه جدیدی منتشر کنید."+ }+ }+}diff --git a/locales/fa-IR/setting.json b/locales/fa-IR/setting.jsonindex 948bb36f921..35a5efee5d3 100644--- a/locales/fa-IR/setting.json+++ b/locales/fa-IR/setting.json@@ -2,6 +2,45 @@"about": {"title": "درباره"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "تصویر نمایه",+ "description": "توضیحات",+ "name": "نام",+ "tags": "برچسبها",+ "title": "اطلاعات دستیار"+ },+ "chat": {+ "displayMode": "حالت نمایش",+ "enableHistoryCount": "فعالسازی شمارش پیامهای پیشین",+ "historyCount": "تعداد پیامهای پیشین",+ "no": "خیر",+ "searchMode": "حالت جستجو",+ "title": "ترجیحات گفتگو",+ "yes": "بله"+ },+ "model": {+ "maxTokens": "حداکثر تعداد توکن",+ "model": "مدل",+ "provider": "ارائهدهنده",+ "temperature": "دمای مدل",+ "title": "تنظیمات مدل",+ "topP": "مقدار Top P"+ },+ "plugins": {+ "count": "تنظیمات افزونه ({{count}})",+ "empty": "افزونهای نصب نشده است",+ "title": "افزونههای نصبشده"+ },+ "role": {+ "systemRole": "دستورالعمل سیستمی",+ "title": "تنظیمات نقش"+ },+ "value": {+ "unset": "تنظیمنشده",+ "untitled": "دستیار بدون عنوان"+ }+ },"agentTab": {"chat": "ترجیحات گفتگو","meta": "اطلاعات دستیار",@@ -18,6 +57,8 @@},"title": "آمار و دادهها"},+ "checking": "در حال بررسی...",+ "checkingPermissions": "در حال بررسی مجوزها...","danger": {"clear": {"action": "پاکسازی فوری",@@ -146,6 +187,58 @@},"waitingForMore": "مدلهای بیشتری در حال <1>برنامهریزی برای اضافه شدن</1> هستند، لطفاً منتظر بمانید"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "توضیحی درباره تغییرات و بهبودهای اصلی این نسخه ارائه دهید",+ "label": "گزارش تغییرات",+ "maxLengthError": "گزارش تغییرات نباید بیش از ۵۰۰ کاراکتر باشد",+ "placeholder": "لطفاً گزارش تغییرات را وارد کنید",+ "required": "لطفاً گزارش تغییرات را وارد کنید"+ },+ "comparison": {+ "local": "نسخه فعلی محلی",+ "remote": "نسخه منتشرشده فعلی"+ },+ "identifier": {+ "extra": "شناسه بهعنوان شناسه یکتای دستیار استفاده میشود. استفاده از حروف کوچک، اعداد و خط تیره توصیه میشود",+ "label": "شناسه دستیار",+ "lengthError": "طول شناسه باید بین ۳ تا ۵۰ کاراکتر باشد",+ "patternError": "شناسه فقط میتواند شامل حروف کوچک، اعداد و خط تیره باشد",+ "placeholder": "لطفاً شناسه یکتای دستیار را وارد کنید، مانند: web-development",+ "required": "لطفاً شناسه دستیار را وارد کنید"+ },+ "loading": {+ "fetchingRemote": "در حال بارگذاری دادههای راه دور...",+ "submit": "در حال انتشار دستیار...",+ "upload": "در حال انتشار نسخه جدید..."+ },+ "messages": {+ "createVersionFailed": "ایجاد نسخه با شکست مواجه شد: {{message}}",+ "fetchRemoteFailed": "دریافت دادههای دستیار از راه دور با شکست مواجه شد",+ "missingIdentifier": "این دستیار هنوز شناسه بازار ندارد",+ "notAuthenticated": "لطفاً ابتدا وارد حساب بازار شوید",+ "publishFailed": "انتشار با شکست مواجه شد: {{message}}"+ },+ "submitButton": "انتشار",+ "title": {+ "submit": "اشتراکگذاری در بازار دستیار",+ "upload": "انتشار نسخه جدید"+ }+ },+ "resultModal": {+ "message": "دستیار برای بررسی ارسال شد. پس از تأیید، بهصورت خودکار منتشر خواهد شد. برای مشاهده دستیار منتشرشده، روی «مشاهده در بازار» کلیک کنید.",+ "view": "مشاهده در بازار"+ },+ "submit": {+ "button": "اشتراکگذاری در بازار",+ "tooltip": "دستیار را در بازار به اشتراک بگذارید"+ },+ "upload": {+ "button": "انتشار نسخه جدید",+ "tooltip": "نسخه جدیدی از دستیار را در بازار منتشر کنید"+ }+ },"message": {"success": "بهروزرسانی با موفقیت انجام شد"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "ارسال دستیار",- "identifier": "شناسه دستیار",+ "identifier": "شناسه دستیار (identifier)","metaMiss": "لطفاً اطلاعات دستیار را تکمیل کنید و سپس ارسال نمایید. باید شامل نام، توضیحات و برچسبها باشد.","placeholder": "لطفاً شناسه دستیار را وارد کنید. باید منحصربهفرد باشد، مانند web-development","tooltips": "اشتراکگذاری در بازار دستیار"diff --git a/locales/fr-FR/discover.json b/locales/fr-FR/discover.jsonindex 78071397b7a..776ec0e2d52 100644--- a/locales/fr-FR/discover.json+++ b/locales/fr-FR/discover.json@@ -41,9 +41,29 @@"openingMessage": "Message d'ouverture","openingQuestions": "Questions d'ouverture","title": "Paramètres de l'assistant"+ },+ "version": {+ "empty": "Aucune version historique disponible",+ "status": {+ "archived": "Archivé",+ "deprecated": "Rejeté",+ "unpublished": "En cours de révision"+ },+ "table": {+ "isLatest": "Dernière version",+ "isValidated": "Validé",+ "publishAt": "Date de publication",+ "version": "Numéro de version"+ },+ "title": "Historique des versions"}},"list": "Liste des assistants",+ "marketSource": {+ "label": "Changer de source de marché",+ "legacy": "Ancien marché",+ "new": "Nouveau marché"+ },"more": "Plus","plugins": "Intégrer des plugins","recentSubmits": "Mises à jour récentes",@@ -51,10 +71,35 @@"createdAt": "Publié récemment","identifier": "ID de l'assistant","knowledgeCount": "Nombre de bases de connaissances",+ "myown": "Voir mes assistants","pluginCount": "Nombre de plugins","title": "Nom de l'assistant","tokenUsage": "Utilisation des tokens"},+ "status": {+ "archived": {+ "reasons": {+ "official": "L’assistant a été retiré par l’équipe officielle pour des raisons de sécurité ou politiques",+ "owner": "Le propriétaire de l’assistant a volontairement retiré/archivé cet assistant"+ },+ "subtitle": "L’assistant que vous essayez d’accéder a été archivé pour l’une des raisons suivantes :",+ "title": "Assistant archivé"+ },+ "backToMarket": "Retour au marché des assistants",+ "deprecated": {+ "reasons": {+ "official": "L’assistant a été retiré par l’équipe officielle pour des raisons de sécurité ou politiques",+ "owner": "Le propriétaire de l’assistant a volontairement retiré/rejeté cet assistant"+ },+ "subtitle": "L’assistant que vous essayez d’accéder a été rejeté pour l’une des raisons suivantes :",+ "title": "Assistant rejeté"+ },+ "support": "Pour toute question, veuillez copier le lien et l’envoyer à <1>[email protected]</1> pour assistance.",+ "unpublished": {+ "subtitle": "L’assistant que vous essayez d’accéder est en cours de révision. Pour toute question, veuillez copier le lien et l’envoyer à <1>[email protected]</1>.",+ "title": "Assistant en cours de révision"+ }+ },"suggestions": "Suggestions connexes","systemRole": "Paramètres de l'assistant","tokenUsage": "Utilisation des tokens dans les invites de l'assistant",diff --git a/locales/fr-FR/marketAuth.json b/locales/fr-FR/marketAuth.jsonnew file mode 100644index 00000000000..eea45c64aa0--- /dev/null+++ b/locales/fr-FR/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Fermer la fenêtre"+ },+ "messages": {+ "authFailed": "Échec de l'autorisation : {{error}}",+ "missingParams": "Paramètres d'autorisation manquants",+ "processing": "Traitement de l'autorisation en cours...",+ "successWithCountdown": "{{message}} La fenêtre se fermera automatiquement dans {{countdown}} secondes",+ "successWithRedirect": "Autorisation réussie ! Redirection en cours..."+ },+ "titles": {+ "error": "Échec de l'autorisation",+ "loading": "Autorisation LobeHub Market",+ "success": "Autorisation réussie"+ }+ },+ "errors": {+ "authorizationFailed": "Échec de l'autorisation, veuillez réessayer.",+ "browserOnly": "Le processus d'autorisation ne peut être lancé que dans un navigateur.",+ "codeConsumed": "Le code d'autorisation a déjà été utilisé, veuillez réessayer.",+ "codeVerifierMissing": "Session d'autorisation invalide, veuillez relancer le processus de connexion.",+ "general": "Une erreur est survenue lors de l'autorisation, veuillez réessayer.",+ "handoffFailed": "Impossible d'obtenir le résultat de l'autorisation, veuillez réessayer.",+ "handoffTimeout": "Délai d'autorisation dépassé, veuillez réessayer après avoir terminé l'opération dans le navigateur.",+ "oidcNotReady": "Le service d'autorisation n'est pas encore prêt, veuillez réessayer plus tard.",+ "openBrowserFailed": "Impossible d'ouvrir le navigateur système, veuillez réessayer.",+ "openPopupFailed": "Impossible d'ouvrir la fenêtre d'autorisation, veuillez vérifier les paramètres de blocage des pop-ups de votre navigateur.",+ "popupClosed": "La fenêtre d'autorisation a été fermée avant la fin du processus.",+ "sessionExpired": "La session d'autorisation a expiré, veuillez vous reconnecter.",+ "stateMismatch": "État d'autorisation non valide, veuillez réessayer.",+ "stateMissing": "État d'autorisation introuvable, veuillez réessayer."+ },+ "messages": {+ "loading": "Lancement du processus d'autorisation...",+ "success": {+ "submit": "Autorisation réussie ! Vous pouvez maintenant publier un assistant.",+ "upload": "Autorisation réussie ! Vous pouvez maintenant publier une nouvelle version."+ }+ }+}diff --git a/locales/fr-FR/setting.json b/locales/fr-FR/setting.jsonindex f85acc287ee..3eb60df59cc 100644--- a/locales/fr-FR/setting.json+++ b/locales/fr-FR/setting.json@@ -2,6 +2,45 @@"about": {"title": "À propos"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Avatar",+ "description": "Description",+ "name": "Nom",+ "tags": "Étiquettes",+ "title": "Informations de l'assistant"+ },+ "chat": {+ "displayMode": "Mode d'affichage",+ "enableHistoryCount": "Activer le comptage des messages historiques",+ "historyCount": "Nombre de messages historiques",+ "no": "Non",+ "searchMode": "Mode de recherche",+ "title": "Préférences de discussion",+ "yes": "Oui"+ },+ "model": {+ "maxTokens": "Nombre maximal de tokens",+ "model": "Modèle",+ "provider": "Fournisseur",+ "temperature": "Température",+ "title": "Paramètres du modèle",+ "topP": "Valeur Top P"+ },+ "plugins": {+ "count": "Paramètres des plugins ({{count}})",+ "empty": "Aucun plugin installé",+ "title": "Plugins installés"+ },+ "role": {+ "systemRole": "Invite système",+ "title": "Paramètres du rôle"+ },+ "value": {+ "unset": "Non défini",+ "untitled": "Assistant sans titre"+ }+ },"agentTab": {"chat": "Préférences de discussion","meta": "Informations de l'agent",@@ -18,6 +57,8 @@},"title": "Analytique"},+ "checking": "Vérification en cours...",+ "checkingPermissions": "Vérification des autorisations...","danger": {"clear": {"action": "Effacer immédiatement",@@ -146,6 +187,58 @@},"waitingForMore": "Plus de modèles sont en cours de <1>planification pour être ajoutés</1>, restez à l'écoute"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Décrivez les principales modifications et améliorations de cette version",+ "label": "Journal des modifications",+ "maxLengthError": "Le journal des modifications ne peut pas dépasser 500 caractères",+ "placeholder": "Veuillez saisir le journal des modifications",+ "required": "Veuillez saisir le journal des modifications"+ },+ "comparison": {+ "local": "Version locale actuelle",+ "remote": "Version publiée actuelle"+ },+ "identifier": {+ "extra": "L'identifiant servira d'identifiant unique de l'assistant. Il est recommandé d'utiliser des lettres minuscules, des chiffres et des tirets",+ "label": "Identifiant de l'assistant",+ "lengthError": "La longueur de l'identifiant doit être comprise entre 3 et 50 caractères",+ "patternError": "L'identifiant ne peut contenir que des lettres minuscules, des chiffres et des tirets",+ "placeholder": "Veuillez saisir l'identifiant unique de l'assistant, par ex. : web-development",+ "required": "Veuillez saisir l'identifiant de l'assistant"+ },+ "loading": {+ "fetchingRemote": "Chargement des données distantes...",+ "submit": "Publication de l'assistant en cours...",+ "upload": "Publication de la nouvelle version en cours..."+ },+ "messages": {+ "createVersionFailed": "Échec de la création de la version : {{message}}",+ "fetchRemoteFailed": "Échec de la récupération des données de l'assistant distant",+ "missingIdentifier": "L'assistant actuel n'a pas encore d'identifiant de marché",+ "notAuthenticated": "Veuillez vous connecter à votre compte du marché",+ "publishFailed": "Échec de la publication : {{message}}"+ },+ "submitButton": "Publier",+ "title": {+ "submit": "Partager sur le marché des assistants",+ "upload": "Publier une nouvelle version"+ }+ },+ "resultModal": {+ "message": "L'assistant a été soumis pour révision. Il sera mis en ligne automatiquement une fois approuvé. Cliquez sur « Voir sur le marché » pour consulter l'assistant publié.",+ "view": "Voir sur le marché"+ },+ "submit": {+ "button": "Partager sur le marché",+ "tooltip": "Partager l'assistant sur le marché"+ },+ "upload": {+ "button": "Publier une nouvelle version",+ "tooltip": "Publier une nouvelle version sur le marché des assistants"+ }+ },"message": {"success": "Mise à jour réussie"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Soumettre l'agent",- "identifier": "Identifiant de l'agent",+ "identifier": "Identifiant de l'assistant (identifier)","metaMiss": "Veuillez compléter les informations de l'agent avant de soumettre. Elles doivent inclure le nom, la description et les balises.","placeholder": "Veuillez entrer l'identifiant de l'agent, qui doit être unique, par exemple développement-web","tooltips": "Partager sur le marché des agents"diff --git a/locales/it-IT/discover.json b/locales/it-IT/discover.jsonindex caa0aeda6cb..b2be3108901 100644--- a/locales/it-IT/discover.json+++ b/locales/it-IT/discover.json@@ -41,9 +41,29 @@"openingMessage": "Messaggio di apertura","openingQuestions": "Domande di apertura","title": "Impostazioni dell'assistente"+ },+ "version": {+ "empty": "Nessuna versione storica disponibile",+ "status": {+ "archived": "Archiviato",+ "deprecated": "Rifiutato",+ "unpublished": "In revisione"+ },+ "table": {+ "isLatest": "Ultima versione",+ "isValidated": "Verificato",+ "publishAt": "Data di pubblicazione",+ "version": "Numero di versione"+ },+ "title": "Cronologia delle versioni"}},"list": "Elenco assistenti",+ "marketSource": {+ "label": "Cambia sorgente del mercato",+ "legacy": "Mercato precedente",+ "new": "Nuovo mercato"+ },"more": "Di più","plugins": "Plugin integrati","recentSubmits": "Aggiornamenti recenti",@@ -51,10 +71,35 @@"createdAt": "Pubblicati di recente","identifier": "ID assistente","knowledgeCount": "Numero di basi di conoscenza",+ "myown": "Visualizza i miei","pluginCount": "Numero di plugin","title": "Nome assistente","tokenUsage": "Utilizzo token"},+ "status": {+ "archived": {+ "reasons": {+ "official": "L'assistente è stato rimosso ufficialmente per motivi di sicurezza o politici",+ "owner": "Il proprietario dell'assistente ha deciso di rimuoverlo o archiviarlo"+ },+ "subtitle": "L'assistente che stai cercando di accedere è stato archiviato per uno dei seguenti motivi:",+ "title": "Assistente archiviato"+ },+ "backToMarket": "Torna al mercato degli assistenti",+ "deprecated": {+ "reasons": {+ "official": "L'assistente è stato rimosso ufficialmente per motivi di sicurezza o politici",+ "owner": "Il proprietario dell'assistente ha deciso di rimuoverlo o rifiutarlo"+ },+ "subtitle": "L'assistente che stai cercando di accedere è stato rifiutato per uno dei seguenti motivi:",+ "title": "Assistente rifiutato"+ },+ "support": "Per qualsiasi problema, copia il link e invialo a <1>[email protected]</1> per assistenza.",+ "unpublished": {+ "subtitle": "L'assistente che stai cercando di accedere è attualmente in fase di revisione. Per domande, copia il link e invialo a <1>[email protected]</1>.",+ "title": "Assistente in revisione"+ }+ },"suggestions": "Suggerimenti correlati","systemRole": "Impostazioni assistente","tokenUsage": "Utilizzo token per prompt assistente",diff --git a/locales/it-IT/marketAuth.json b/locales/it-IT/marketAuth.jsonnew file mode 100644index 00000000000..62aa117e379--- /dev/null+++ b/locales/it-IT/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Chiudi finestra"+ },+ "messages": {+ "authFailed": "Autorizzazione fallita: {{error}}",+ "missingParams": "Parametri di autorizzazione mancanti",+ "processing": "Autorizzazione in corso...",+ "successWithCountdown": "{{message}} La finestra si chiuderà automaticamente tra {{countdown}} secondi",+ "successWithRedirect": "Autorizzazione riuscita! Reindirizzamento in corso..."+ },+ "titles": {+ "error": "Autorizzazione fallita",+ "loading": "Autorizzazione LobeHub Market",+ "success": "Autorizzazione riuscita"+ }+ },+ "errors": {+ "authorizationFailed": "Autorizzazione fallita, riprova.",+ "browserOnly": "Il processo di autorizzazione può essere avviato solo nel browser.",+ "codeConsumed": "Il codice di autorizzazione è già stato utilizzato, riprova.",+ "codeVerifierMissing": "Sessione di autorizzazione non valida, avvia nuovamente il login.",+ "general": "Si è verificato un errore durante l'autorizzazione, riprova.",+ "handoffFailed": "Impossibile ottenere il risultato dell'autorizzazione, riprova.",+ "handoffTimeout": "Autorizzazione scaduta, completa l'operazione nel browser e riprova.",+ "oidcNotReady": "Il servizio di autorizzazione non è ancora pronto, riprova più tardi.",+ "openBrowserFailed": "Impossibile aprire il browser di sistema, riprova.",+ "openPopupFailed": "Impossibile aprire la finestra di autorizzazione, controlla le impostazioni del blocco popup del browser.",+ "popupClosed": "La finestra di autorizzazione è stata chiusa prima del completamento.",+ "sessionExpired": "La sessione di autorizzazione è scaduta, effettua nuovamente l'accesso.",+ "stateMismatch": "Stato di autorizzazione non corrispondente, riprova.",+ "stateMissing": "Stato di autorizzazione non trovato, riprova."+ },+ "messages": {+ "loading": "Avvio del processo di autorizzazione in corso...",+ "success": {+ "submit": "Autorizzazione riuscita! Ora puoi pubblicare l'assistente.",+ "upload": "Autorizzazione riuscita! Ora puoi pubblicare una nuova versione."+ }+ }+}diff --git a/locales/it-IT/setting.json b/locales/it-IT/setting.jsonindex b8e8b3324c7..23ee0f73535 100644--- a/locales/it-IT/setting.json+++ b/locales/it-IT/setting.json@@ -2,6 +2,45 @@"about": {"title": "Informazioni"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Avatar",+ "description": "Descrizione",+ "name": "Nome",+ "tags": "Tag",+ "title": "Informazioni sull'assistente"+ },+ "chat": {+ "displayMode": "Modalità di visualizzazione",+ "enableHistoryCount": "Abilita conteggio messaggi storici",+ "historyCount": "Numero di messaggi storici",+ "no": "No",+ "searchMode": "Modalità di ricerca",+ "title": "Preferenze di chat",+ "yes": "Sì"+ },+ "model": {+ "maxTokens": "Numero massimo di token",+ "model": "Modello",+ "provider": "Fornitore",+ "temperature": "Temperatura",+ "title": "Impostazioni del modello",+ "topP": "Valore Top P"+ },+ "plugins": {+ "count": "Impostazioni plugin ({{count}})",+ "empty": "Nessun plugin installato",+ "title": "Plugin installati"+ },+ "role": {+ "systemRole": "Prompt di sistema",+ "title": "Impostazioni del ruolo"+ },+ "value": {+ "unset": "Non impostato",+ "untitled": "Assistente senza titolo"+ }+ },"agentTab": {"chat": "Preferenze di chat","meta": "Informazioni assistente",@@ -18,6 +57,8 @@},"title": "Analisi"},+ "checking": "Verifica in corso...",+ "checkingPermissions": "Verifica dei permessi in corso...","danger": {"clear": {"action": "Cancella subito",@@ -146,6 +187,58 @@},"waitingForMore": "Altri modelli sono in fase di <1> pianificazione per l'integrazione </1>, resta sintonizzato"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Descrivi i principali cambiamenti e miglioramenti di questa versione",+ "label": "Registro delle modifiche",+ "maxLengthError": "Il registro delle modifiche non può superare i 500 caratteri",+ "placeholder": "Inserisci il registro delle modifiche",+ "required": "Inserisci il registro delle modifiche"+ },+ "comparison": {+ "local": "Versione locale attuale",+ "remote": "Versione pubblicata attuale"+ },+ "identifier": {+ "extra": "L'identificatore sarà l'identificativo univoco dell'assistente. Si consiglia di usare lettere minuscole, numeri e trattini",+ "label": "Identificatore dell'assistente",+ "lengthError": "La lunghezza dell'identificatore deve essere compresa tra 3 e 50 caratteri",+ "patternError": "L'identificatore può contenere solo lettere minuscole, numeri e trattini",+ "placeholder": "Inserisci l'identificatore univoco dell'assistente, ad es.: web-development",+ "required": "Inserisci l'identificatore dell'assistente"+ },+ "loading": {+ "fetchingRemote": "Caricamento dati remoti in corso...",+ "submit": "Pubblicazione dell'assistente in corso...",+ "upload": "Pubblicazione della nuova versione in corso..."+ },+ "messages": {+ "createVersionFailed": "Creazione della versione fallita: {{message}}",+ "fetchRemoteFailed": "Impossibile recuperare i dati dell'assistente remoto",+ "missingIdentifier": "L'assistente attuale non ha ancora un identificatore di mercato",+ "notAuthenticated": "Accedi prima al tuo account del mercato",+ "publishFailed": "Pubblicazione fallita: {{message}}"+ },+ "submitButton": "Pubblica",+ "title": {+ "submit": "Condividi nel mercato degli assistenti",+ "upload": "Pubblica nuova versione"+ }+ },+ "resultModal": {+ "message": "L'assistente è stato inviato per la revisione. Una volta approvato, sarà pubblicato automaticamente. Clicca su \"Visualizza nel mercato\" per vedere l'assistente pubblicato.",+ "view": "Visualizza nel mercato"+ },+ "submit": {+ "button": "Condividi nel mercato",+ "tooltip": "Condividi l'assistente nel mercato"+ },+ "upload": {+ "button": "Pubblica nuova versione",+ "tooltip": "Pubblica una nuova versione nel mercato degli assistenti"+ }+ },"message": {"success": "Aggiornamento riuscito"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Invia assistente",- "identifier": "Identificatore assistente",+ "identifier": "Identificatore dell'assistente (identifier)","metaMiss": "Si prega di completare le informazioni dell'assistente prima di inviare, è necessario includere nome, descrizione e tag","placeholder": "Inserisci l'identificatore dell'assistente, deve essere univoco, ad esempio sviluppo-web","tooltips": "Condividi sul mercato degli assistenti"diff --git a/locales/ja-JP/discover.json b/locales/ja-JP/discover.jsonindex 34159990c88..e090a8a0428 100644--- a/locales/ja-JP/discover.json+++ b/locales/ja-JP/discover.json@@ -41,9 +41,29 @@"openingMessage": "開始メッセージ","openingQuestions": "開始時の質問","title": "アシスタント設定"+ },+ "version": {+ "empty": "履歴バージョンはありません",+ "status": {+ "archived": "アーカイブ済み",+ "deprecated": "却下されました",+ "unpublished": "審査中"+ },+ "table": {+ "isLatest": "最新バージョン",+ "isValidated": "検証済み",+ "publishAt": "公開日",+ "version": "バージョン番号"+ },+ "title": "バージョン履歴"}},"list": "アシスタントリスト",+ "marketSource": {+ "label": "マーケットソースを切り替える",+ "legacy": "旧マーケット",+ "new": "新マーケット"+ },"more": "もっと見る","plugins": "プラグインを統合","recentSubmits": "最近の更新",@@ -51,10 +71,35 @@"createdAt": "最新公開","identifier": "アシスタントID","knowledgeCount": "ナレッジベース数",+ "myown": "自分のアシスタントを見る","pluginCount": "プラグイン数","title": "アシスタント名","tokenUsage": "トークン使用量"},+ "status": {+ "archived": {+ "reasons": {+ "official": "アシスタントに安全性や政治的な問題があり、公式により削除されました",+ "owner": "アシスタントの開発者が自ら削除またはアーカイブしました"+ },+ "subtitle": "現在アクセスしているアシスタントは、以下の理由によりアーカイブされています:",+ "title": "アシスタントはアーカイブされました"+ },+ "backToMarket": "アシスタントマーケットに戻る",+ "deprecated": {+ "reasons": {+ "official": "アシスタントに安全性や政治的な問題があり、公式により削除されました",+ "owner": "アシスタントの開発者が自ら削除または却下しました"+ },+ "subtitle": "現在アクセスしているアシスタントは、以下の理由により却下されています:",+ "title": "アシスタントは却下されました"+ },+ "support": "ご不明な点がある場合は、リンクをコピーして <1>[email protected]</1> までお問い合わせください。",+ "unpublished": {+ "subtitle": "現在アクセスしているアシスタントはバージョン審査中です。ご質問がある場合は、リンクをコピーして <1>[email protected]</1> までお問い合わせください。",+ "title": "アシスタントは審査中です"+ }+ },"suggestions": "関連情報","systemRole": "アシスタント設定","tokenUsage": "アシスタントプロンプトのトークン使用量",diff --git a/locales/ja-JP/marketAuth.json b/locales/ja-JP/marketAuth.jsonnew file mode 100644index 00000000000..bb75a16a7c5--- /dev/null+++ b/locales/ja-JP/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "ウィンドウを閉じる"+ },+ "messages": {+ "authFailed": "認証に失敗しました: {{error}}",+ "missingParams": "認証パラメーターが不足しています",+ "processing": "認証を処理中...",+ "successWithCountdown": "{{message}} ウィンドウは {{countdown}} 秒後に自動的に閉じられます",+ "successWithRedirect": "認証に成功しました!リダイレクト中です..."+ },+ "titles": {+ "error": "認証失敗",+ "loading": "LobeHub Market 認証",+ "success": "認証成功"+ }+ },+ "errors": {+ "authorizationFailed": "認証に失敗しました。もう一度お試しください。",+ "browserOnly": "認証プロセスはブラウザでのみ開始できます。",+ "codeConsumed": "認証コードはすでに使用されています。再度お試しください。",+ "codeVerifierMissing": "認証セッションが無効です。ログインプロセスを再度開始してください。",+ "general": "認証中にエラーが発生しました。もう一度お試しください。",+ "handoffFailed": "認証結果を取得できませんでした。もう一度お試しください。",+ "handoffTimeout": "認証がタイムアウトしました。ブラウザで操作を完了した後、再度お試しください。",+ "oidcNotReady": "認証サービスがまだ準備できていません。しばらくしてから再度お試しください。",+ "openBrowserFailed": "システムブラウザを開けませんでした。もう一度お試しください。",+ "openPopupFailed": "認証ポップアップを開けませんでした。ブラウザのポップアップブロック設定をご確認ください。",+ "popupClosed": "認証ウィンドウが完了前に閉じられました。",+ "sessionExpired": "認証セッションの有効期限が切れました。再度ログインしてください。",+ "stateMismatch": "認証状態が一致しません。もう一度お試しください。",+ "stateMissing": "認証状態が見つかりません。もう一度お試しください。"+ },+ "messages": {+ "loading": "認証プロセスを開始しています...",+ "success": {+ "submit": "認証に成功しました!アシスタントを公開できます。",+ "upload": "認証に成功しました!新しいバージョンを公開できます。"+ }+ }+}diff --git a/locales/ja-JP/setting.json b/locales/ja-JP/setting.jsonindex 8989c103c16..59456722b49 100644--- a/locales/ja-JP/setting.json+++ b/locales/ja-JP/setting.json@@ -2,6 +2,45 @@"about": {"title": "について"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "アバター",+ "description": "説明",+ "name": "名前",+ "tags": "タグ",+ "title": "アシスタント情報"+ },+ "chat": {+ "displayMode": "表示モード",+ "enableHistoryCount": "履歴メッセージ数を有効にする",+ "historyCount": "履歴メッセージ数",+ "no": "いいえ",+ "searchMode": "検索モード",+ "title": "チャット設定",+ "yes": "はい"+ },+ "model": {+ "maxTokens": "最大トークン数",+ "model": "モデル",+ "provider": "プロバイダー",+ "temperature": "温度",+ "title": "モデル設定",+ "topP": "Top P 値"+ },+ "plugins": {+ "count": "プラグイン設定({{count}})",+ "empty": "プラグインがまだインストールされていません",+ "title": "インストール済みプラグイン"+ },+ "role": {+ "systemRole": "システムプロンプト",+ "title": "ロール設定"+ },+ "value": {+ "unset": "未設定",+ "untitled": "無題のアシスタント"+ }+ },"agentTab": {"chat": "チャット設定","meta": "メタ情報",@@ -18,6 +57,8 @@},"title": "データ分析"},+ "checking": "確認中...",+ "checkingPermissions": "権限を確認中...","danger": {"clear": {"action": "すぐにクリア",@@ -146,6 +187,58 @@},"waitingForMore": "さらに多くのモデルが <1>計画されています</1>。お楽しみに"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "このバージョンの主な変更点と改善点を記述してください",+ "label": "変更ログ",+ "maxLengthError": "変更ログは500文字以内で入力してください",+ "placeholder": "変更ログを入力してください",+ "required": "変更ログを入力してください"+ },+ "comparison": {+ "local": "ローカルの現在のバージョン",+ "remote": "公開中のバージョン"+ },+ "identifier": {+ "extra": "識別子はアシスタントの一意なIDとして使用されます。小文字、数字、ハイフンの使用を推奨します",+ "label": "アシスタント識別子",+ "lengthError": "識別子の長さは3〜50文字である必要があります",+ "patternError": "識別子には小文字、数字、ハイフンのみ使用できます",+ "placeholder": "例: web-development のように一意な識別子を入力してください",+ "required": "アシスタント識別子を入力してください"+ },+ "loading": {+ "fetchingRemote": "リモートデータを読み込み中...",+ "submit": "アシスタントを公開中...",+ "upload": "新しいバージョンを公開中..."+ },+ "messages": {+ "createVersionFailed": "バージョンの作成に失敗しました: {{message}}",+ "fetchRemoteFailed": "リモートアシスタントデータの取得に失敗しました",+ "missingIdentifier": "現在のアシスタントにはマーケット識別子がありません",+ "notAuthenticated": "まずマーケットアカウントにログインしてください",+ "publishFailed": "公開に失敗しました: {{message}}"+ },+ "submitButton": "公開",+ "title": {+ "submit": "アシスタントマーケットに共有",+ "upload": "新しいバージョンを公開"+ }+ },+ "resultModal": {+ "message": "アシスタントは審査に提出されました。審査に通過すると自動的に公開されます。「マーケットで確認」をクリックして公開済みのアシスタントを確認できます。",+ "view": "マーケットで確認"+ },+ "submit": {+ "button": "マーケットに共有",+ "tooltip": "アシスタントをマーケットに共有する"+ },+ "upload": {+ "button": "新しいバージョンを公開",+ "tooltip": "アシスタントマーケットに新しいバージョンを公開する"+ }+ },"message": {"success": "更新に成功しました"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "エージェントを提出",- "identifier": "エージェント識別子",+ "identifier": "アシスタント識別子(identifier)","metaMiss": "エージェント情報を入力してから提出してください。名前、説明、タグが必要です。","placeholder": "エージェントの識別子を入力してください。一意である必要があります。例:web-development","tooltips": "エージェントマーケットに共有"diff --git a/locales/ko-KR/discover.json b/locales/ko-KR/discover.jsonindex 08f7afb9204..a4262a875b1 100644--- a/locales/ko-KR/discover.json+++ b/locales/ko-KR/discover.json@@ -41,9 +41,29 @@"openingMessage": "시작 메시지","openingQuestions": "시작 질문","title": "도우미 설정"+ },+ "version": {+ "empty": "이전 버전이 없습니다",+ "status": {+ "archived": "보관됨",+ "deprecated": "거부됨",+ "unpublished": "검토 중"+ },+ "table": {+ "isLatest": "최신 버전",+ "isValidated": "검증됨",+ "publishAt": "출시일",+ "version": "버전 번호"+ },+ "title": "버전 기록"}},"list": "도우미 목록",+ "marketSource": {+ "label": "마켓 소스 전환",+ "legacy": "이전 마켓",+ "new": "신규 마켓"+ },"more": "더 보기","plugins": "통합 플러그인","recentSubmits": "최근 업데이트",@@ -51,10 +71,35 @@"createdAt": "최신 등록","identifier": "도우미 ID","knowledgeCount": "지식 기반 수",+ "myown": "내가 만든 것 보기","pluginCount": "플러그인 수","title": "도우미 이름","tokenUsage": "토큰 사용량"},+ "status": {+ "archived": {+ "reasons": {+ "official": "보안 또는 정치적 문제로 인해 공식적으로 마켓에서 제거됨",+ "owner": "개발자가 자발적으로 보관 또는 제거함"+ },+ "subtitle": "현재 접근 중인 어시스턴트는 다음과 같은 이유로 보관되었습니다:",+ "title": "어시스턴트가 보관되었습니다"+ },+ "backToMarket": "어시스턴트 마켓으로 돌아가기",+ "deprecated": {+ "reasons": {+ "official": "보안 또는 정치적 문제로 인해 공식적으로 마켓에서 제거됨",+ "owner": "개발자가 자발적으로 거부 또는 제거함"+ },+ "subtitle": "현재 접근 중인 어시스턴트는 다음과 같은 이유로 거부되었습니다:",+ "title": "어시스턴트가 거부되었습니다"+ },+ "support": "문제가 있으시면 링크를 복사하여 <1>[email protected]</1> 으로 문의해 주세요.",+ "unpublished": {+ "subtitle": "현재 접근 중인 어시스턴트는 버전 검토 중입니다. 문의 사항이 있으시면 링크를 복사하여 <1>[email protected]</1> 으로 문의해 주세요.",+ "title": "어시스턴트 검토 중"+ }+ },"suggestions": "추천 도우미","systemRole": "도우미 설정","tokenUsage": "도우미 프롬프트 토큰 사용량",diff --git a/locales/ko-KR/marketAuth.json b/locales/ko-KR/marketAuth.jsonnew file mode 100644index 00000000000..cc6c2c8ae68--- /dev/null+++ b/locales/ko-KR/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "창 닫기"+ },+ "messages": {+ "authFailed": "인증 실패: {{error}}",+ "missingParams": "인증 매개변수가 누락되었습니다",+ "processing": "인증을 처리 중입니다...",+ "successWithCountdown": "{{message}} 창이 {{countdown}}초 후에 자동으로 닫힙니다",+ "successWithRedirect": "인증 성공! 리디렉션 중입니다..."+ },+ "titles": {+ "error": "인증 실패",+ "loading": "LobeHub 마켓 인증",+ "success": "인증 성공"+ }+ },+ "errors": {+ "authorizationFailed": "인증에 실패했습니다. 다시 시도해 주세요.",+ "browserOnly": "인증 절차는 브라우저에서만 시작할 수 있습니다.",+ "codeConsumed": "인증 코드가 이미 사용되었습니다. 다시 시도해 주세요.",+ "codeVerifierMissing": "인증 세션이 유효하지 않습니다. 로그인 절차를 다시 시작해 주세요.",+ "general": "인증 중 오류가 발생했습니다. 다시 시도해 주세요.",+ "handoffFailed": "인증 결과를 가져올 수 없습니다. 다시 시도해 주세요.",+ "handoffTimeout": "인증 시간이 초과되었습니다. 브라우저에서 작업을 완료한 후 다시 시도해 주세요.",+ "oidcNotReady": "인증 서비스가 아직 준비되지 않았습니다. 잠시 후 다시 시도해 주세요.",+ "openBrowserFailed": "시스템 브라우저를 열 수 없습니다. 다시 시도해 주세요.",+ "openPopupFailed": "인증 팝업을 열 수 없습니다. 브라우저의 팝업 차단 설정을 확인해 주세요.",+ "popupClosed": "인증 창이 완료되기 전에 닫혔습니다.",+ "sessionExpired": "인증 세션이 만료되었습니다. 다시 로그인해 주세요.",+ "stateMismatch": "인증 상태가 일치하지 않습니다. 다시 시도해 주세요.",+ "stateMissing": "인증 상태를 찾을 수 없습니다. 다시 시도해 주세요."+ },+ "messages": {+ "loading": "인증 절차를 시작하는 중입니다...",+ "success": {+ "submit": "인증 성공! 이제 어시스턴트를 게시할 수 있습니다.",+ "upload": "인증 성공! 이제 새 버전을 게시할 수 있습니다."+ }+ }+}diff --git a/locales/ko-KR/setting.json b/locales/ko-KR/setting.jsonindex 53827ca6801..874d8439431 100644--- a/locales/ko-KR/setting.json+++ b/locales/ko-KR/setting.json@@ -2,6 +2,45 @@"about": {"title": "정보"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "아바타",+ "description": "설명",+ "name": "이름",+ "tags": "태그",+ "title": "도우미 정보"+ },+ "chat": {+ "displayMode": "표시 모드",+ "enableHistoryCount": "이전 메시지 수 카운트 활성화",+ "historyCount": "이전 메시지 수",+ "no": "아니오",+ "searchMode": "검색 모드",+ "title": "채팅 환경설정",+ "yes": "예"+ },+ "model": {+ "maxTokens": "최대 토큰 수",+ "model": "모델",+ "provider": "서비스 제공자",+ "temperature": "온도",+ "title": "모델 설정",+ "topP": "Top P 값"+ },+ "plugins": {+ "count": "플러그인 설정 ({{count}})",+ "empty": "아직 설치된 플러그인이 없습니다",+ "title": "설치된 플러그인"+ },+ "role": {+ "systemRole": "시스템 프롬프트",+ "title": "역할 설정"+ },+ "value": {+ "unset": "설정되지 않음",+ "untitled": "제목 없는 도우미"+ }+ },"agentTab": {"chat": "채팅 환경설정","meta": "도우미 정보",@@ -18,6 +57,8 @@},"title": "데이터 통계"},+ "checking": "확인 중...",+ "checkingPermissions": "권한 확인 중...","danger": {"clear": {"action": "즉시 삭제",@@ -146,6 +187,58 @@},"waitingForMore": "더 많은 모델이 <1>도입 예정</1>입니다. 기대해 주세요."},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "이 버전의 주요 변경 사항과 개선 사항을 설명하세요",+ "label": "변경 로그",+ "maxLengthError": "변경 로그는 500자 이내여야 합니다",+ "placeholder": "변경 로그를 입력하세요",+ "required": "변경 로그를 입력해 주세요"+ },+ "comparison": {+ "local": "현재 로컬 버전",+ "remote": "현재 게시된 버전"+ },+ "identifier": {+ "extra": "식별자는 도우미의 고유 식별자로 사용되며, 소문자, 숫자, 하이픈을 사용하는 것이 좋습니다",+ "label": "도우미 식별자",+ "lengthError": "식별자는 3자에서 50자 사이여야 합니다",+ "patternError": "식별자는 소문자, 숫자, 하이픈만 포함할 수 있습니다",+ "placeholder": "예: web-development 와 같은 고유 식별자를 입력하세요",+ "required": "도우미 식별자를 입력해 주세요"+ },+ "loading": {+ "fetchingRemote": "원격 데이터를 불러오는 중...",+ "submit": "도우미 게시 중...",+ "upload": "새 버전 게시 중..."+ },+ "messages": {+ "createVersionFailed": "버전 생성 실패: {{message}}",+ "fetchRemoteFailed": "원격 도우미 데이터를 가져오는 데 실패했습니다",+ "missingIdentifier": "현재 도우미에 마켓 식별자가 없습니다",+ "notAuthenticated": "먼저 마켓 계정에 로그인해 주세요",+ "publishFailed": "게시 실패: {{message}}"+ },+ "submitButton": "게시",+ "title": {+ "submit": "도우미 마켓에 공유",+ "upload": "새 버전 게시"+ }+ },+ "resultModal": {+ "message": "도우미가 심사 대기 중입니다. 심사 통과 후 자동으로 게시됩니다. '마켓에서 보기'를 클릭하여 게시된 도우미를 확인하세요.",+ "view": "마켓에서 보기"+ },+ "submit": {+ "button": "마켓에 공유",+ "tooltip": "도우미를 마켓에 공유합니다"+ },+ "upload": {+ "button": "새 버전 게시",+ "tooltip": "도우미 마켓에 새 버전을 게시합니다"+ }+ },"message": {"success": "업데이트 성공"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "에이전트 제출",- "identifier": "에이전트 식별자",+ "identifier": "도우미 식별자(identifier)","metaMiss": "에이전트 정보를 입력한 후 제출하십시오. 이름, 설명 및 태그를 포함해야 합니다.","placeholder": "에이전트 식별자를 입력하세요. 고유해야 하며, 예: 웹 개발","tooltips": "에이전트 마켓에 공유"diff --git a/locales/nl-NL/discover.json b/locales/nl-NL/discover.jsonindex f8a979e2bf2..3ef397d737b 100644--- a/locales/nl-NL/discover.json+++ b/locales/nl-NL/discover.json@@ -41,9 +41,29 @@"openingMessage": "Openingsbericht","openingQuestions": "Openingsvragen","title": "Assistent instellingen"+ },+ "version": {+ "empty": "Geen eerdere versies beschikbaar",+ "status": {+ "archived": "Gearchiveerd",+ "deprecated": "Afgewezen",+ "unpublished": "In beoordeling"+ },+ "table": {+ "isLatest": "Laatste versie",+ "isValidated": "Geverifieerd",+ "publishAt": "Publicatiedatum",+ "version": "Versienummer"+ },+ "title": "Versiegeschiedenis"}},"list": "Assistentenlijst",+ "marketSource": {+ "label": "Wissel van marktplaats",+ "legacy": "Oude marktplaats",+ "new": "Nieuwe marktplaats"+ },"more": "Meer","plugins": "Geïntegreerde plugins","recentSubmits": "Recent bijgewerkt",@@ -51,10 +71,35 @@"createdAt": "Recent gepubliceerd","identifier": "Assistent ID","knowledgeCount": "Aantal kennisbanken",+ "myown": "Bekijk mijn assistenten","pluginCount": "Aantal plugins","title": "Assistent naam","tokenUsage": "Token gebruik"},+ "status": {+ "archived": {+ "reasons": {+ "official": "De assistent is verwijderd door officiële instanties vanwege veiligheids- of politieke redenen",+ "owner": "De eigenaar van de assistent heeft deze vrijwillig verwijderd of gearchiveerd"+ },+ "subtitle": "De assistent die je probeert te openen is gearchiveerd om een van de volgende redenen:",+ "title": "Assistent is gearchiveerd"+ },+ "backToMarket": "Terug naar de assistentenmarktplaats",+ "deprecated": {+ "reasons": {+ "official": "De assistent is verwijderd door officiële instanties vanwege veiligheids- of politieke redenen",+ "owner": "De eigenaar van de assistent heeft deze vrijwillig verwijderd of afgewezen"+ },+ "subtitle": "De assistent die je probeert te openen is afgewezen om een van de volgende redenen:",+ "title": "Assistent is afgewezen"+ },+ "support": "Bij vragen of problemen, kopieer de link en stuur deze naar <1>[email protected]</1> voor ondersteuning.",+ "unpublished": {+ "subtitle": "De assistent die je probeert te openen wordt momenteel beoordeeld. Bij vragen, kopieer de link en stuur deze naar <1>[email protected]</1> voor ondersteuning.",+ "title": "Assistent in beoordeling"+ }+ },"suggestions": "Gerelateerde aanbevelingen","systemRole": "Assistent instellingen","tokenUsage": "Token gebruik van assistent prompt",diff --git a/locales/nl-NL/marketAuth.json b/locales/nl-NL/marketAuth.jsonnew file mode 100644index 00000000000..7e0458d326e--- /dev/null+++ b/locales/nl-NL/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Venster sluiten"+ },+ "messages": {+ "authFailed": "Autorisatie mislukt: {{error}}",+ "missingParams": "Autorisatieparameters ontbreken",+ "processing": "Bezig met autoriseren...",+ "successWithCountdown": "{{message}} Het venster wordt automatisch gesloten over {{countdown}} seconden",+ "successWithRedirect": "Autorisatie geslaagd! Bezig met doorverwijzen..."+ },+ "titles": {+ "error": "Autorisatie mislukt",+ "loading": "LobeHub Market Autorisatie",+ "success": "Autorisatie geslaagd"+ }+ },+ "errors": {+ "authorizationFailed": "Autorisatie mislukt, probeer het opnieuw.",+ "browserOnly": "Het autorisatieproces kan alleen in een browser worden gestart.",+ "codeConsumed": "De autorisatiecode is al gebruikt, probeer het opnieuw.",+ "codeVerifierMissing": "Ongeldige autorisatiesessie, start het inlogproces opnieuw.",+ "general": "Er is een fout opgetreden bij de autorisatie, probeer het opnieuw.",+ "handoffFailed": "Kan het autorisatieresultaat niet ophalen, probeer het opnieuw.",+ "handoffTimeout": "Autorisatie verlopen, voltooi de actie in de browser en probeer het opnieuw.",+ "oidcNotReady": "De autorisatiedienst is nog niet klaar, probeer het later opnieuw.",+ "openBrowserFailed": "Kan de systeembrowser niet openen, probeer het opnieuw.",+ "openPopupFailed": "Kan het autorisatievenster niet openen, controleer de pop-upblokkering van je browser.",+ "popupClosed": "Het autorisatievenster is gesloten voordat het proces was voltooid.",+ "sessionExpired": "De autorisatiesessie is verlopen, log opnieuw in.",+ "stateMismatch": "Autorisatiestatus komt niet overeen, probeer het opnieuw.",+ "stateMissing": "Autorisatiestatus niet gevonden, probeer het opnieuw."+ },+ "messages": {+ "loading": "Autorisatieproces wordt gestart...",+ "success": {+ "submit": "Autorisatie geslaagd! Je kunt nu een assistent publiceren.",+ "upload": "Autorisatie geslaagd! Je kunt nu een nieuwe versie publiceren."+ }+ }+}diff --git a/locales/nl-NL/setting.json b/locales/nl-NL/setting.jsonindex 2f4cf3e6c01..6f511f337cf 100644--- a/locales/nl-NL/setting.json+++ b/locales/nl-NL/setting.json@@ -2,6 +2,45 @@"about": {"title": "Over"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Profielfoto",+ "description": "Beschrijving",+ "name": "Naam",+ "tags": "Tags",+ "title": "Assistentinformatie"+ },+ "chat": {+ "displayMode": "Weergavemodus",+ "enableHistoryCount": "Aantal berichten in geschiedenis inschakelen",+ "historyCount": "Aantal berichten in geschiedenis",+ "no": "Nee",+ "searchMode": "Zoekmodus",+ "title": "Chatvoorkeuren",+ "yes": "Ja"+ },+ "model": {+ "maxTokens": "Maximaal aantal tokens",+ "model": "Model",+ "provider": "Aanbieder",+ "temperature": "Temperatuur",+ "title": "Modelinstellingen",+ "topP": "Top P-waarde"+ },+ "plugins": {+ "count": "Plugin-instellingen ({{count}})",+ "empty": "Nog geen plugins geïnstalleerd",+ "title": "Geïnstalleerde plugins"+ },+ "role": {+ "systemRole": "Systeemprompt",+ "title": "Rolinstellingen"+ },+ "value": {+ "unset": "Niet ingesteld",+ "untitled": "Naamloze assistent"+ }+ },"agentTab": {"chat": "Chatvoorkeur","meta": "Assistentinformatie",@@ -18,6 +57,8 @@},"title": "Analytics"},+ "checking": "Bezig met controleren...",+ "checkingPermissions": "Bezig met controleren van rechten...","danger": {"clear": {"action": "Direct verwijderen",@@ -146,6 +187,58 @@},"waitingForMore": "Meer modellen worden <1>gepland om te worden toegevoegd</1>, dus blijf op de hoogte"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Beschrijf de belangrijkste wijzigingen en verbeteringen in deze versie",+ "label": "Wijzigingslogboek",+ "maxLengthError": "Het wijzigingslogboek mag niet meer dan 500 tekens bevatten",+ "placeholder": "Voer het wijzigingslogboek in",+ "required": "Voer het wijzigingslogboek in"+ },+ "comparison": {+ "local": "Huidige lokale versie",+ "remote": "Huidige gepubliceerde versie"+ },+ "identifier": {+ "extra": "De identifier dient als unieke identificatie van de assistent. Gebruik bij voorkeur kleine letters, cijfers en koppeltekens",+ "label": "Assistentidentifier",+ "lengthError": "De identifier moet tussen 3 en 50 tekens lang zijn",+ "patternError": "De identifier mag alleen kleine letters, cijfers en koppeltekens bevatten",+ "placeholder": "Voer een unieke identifier in, bijv.: web-development",+ "required": "Voer een assistentidentifier in"+ },+ "loading": {+ "fetchingRemote": "Bezig met laden van externe gegevens...",+ "submit": "Bezig met publiceren van assistent...",+ "upload": "Bezig met publiceren van nieuwe versie..."+ },+ "messages": {+ "createVersionFailed": "Versie aanmaken mislukt: {{message}}",+ "fetchRemoteFailed": "Ophalen van externe assistentgegevens mislukt",+ "missingIdentifier": "Deze assistent heeft nog geen marktplaatsidentifier",+ "notAuthenticated": "Log eerst in op je marktplaatsaccount",+ "publishFailed": "Publicatie mislukt: {{message}}"+ },+ "submitButton": "Publiceren",+ "title": {+ "submit": "Delen op de assistentenmarktplaats",+ "upload": "Nieuwe versie publiceren"+ }+ },+ "resultModal": {+ "message": "De assistent is ter beoordeling ingediend. Na goedkeuring wordt deze automatisch gepubliceerd. Klik op 'Bekijk in marktplaats' om de gepubliceerde assistent te bekijken.",+ "view": "Bekijk in marktplaats"+ },+ "submit": {+ "button": "Delen op marktplaats",+ "tooltip": "Deel de assistent op de marktplaats"+ },+ "upload": {+ "button": "Nieuwe versie publiceren",+ "tooltip": "Publiceer een nieuwe versie op de assistentenmarktplaats"+ }+ },"message": {"success": "Succesvol bijgewerkt"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Assistent indienen",- "identifier": "Assistent-identificatie",+ "identifier": "Assistentidentifier (identifier)","metaMiss": "Vul alstublieft de assistentinformatie in voordat u deze indient. Dit moet de naam, beschrijving en labels bevatten","placeholder": "Voer de identificatie van de assistent in, deze moet uniek zijn, bijvoorbeeld web-ontwikkeling","tooltips": "Delen op de assistentenmarkt"diff --git a/locales/pl-PL/discover.json b/locales/pl-PL/discover.jsonindex faa2ecbe328..e650fcc2b11 100644--- a/locales/pl-PL/discover.json+++ b/locales/pl-PL/discover.json@@ -41,9 +41,29 @@"openingMessage": "Wiadomość powitalna","openingQuestions": "Pytania wstępne","title": "Ustawienia asystenta"+ },+ "version": {+ "empty": "Brak dostępnych wersji historycznych",+ "status": {+ "archived": "Zarchiwizowano",+ "deprecated": "Odrzucono",+ "unpublished": "W trakcie przeglądu"+ },+ "table": {+ "isLatest": "Najnowsza wersja",+ "isValidated": "Zweryfikowano",+ "publishAt": "Data publikacji",+ "version": "Wersja"+ },+ "title": "Historia wersji"}},"list": "Lista asystentów",+ "marketSource": {+ "label": "Przełącz źródło rynku",+ "legacy": "Stary rynek",+ "new": "Nowy rynek"+ },"more": "Więcej","plugins": "Zintegrowane wtyczki","recentSubmits": "Ostatnie aktualizacje",@@ -51,10 +71,35 @@"createdAt": "Najnowsze publikacje","identifier": "ID asystenta","knowledgeCount": "Liczba baz wiedzy",+ "myown": "Zobacz moje","pluginCount": "Liczba wtyczek","title": "Nazwa asystenta","tokenUsage": "Zużycie tokenów"},+ "status": {+ "archived": {+ "reasons": {+ "official": "Asystent został usunięty przez administratorów z powodu problemów z bezpieczeństwem lub polityką",+ "owner": "Właściciel asystenta samodzielnie go usunął lub zarchiwizował"+ },+ "subtitle": "Asystent, którego próbujesz odwiedzić, został zarchiwizowany z jednego z poniższych powodów:",+ "title": "Asystent został zarchiwizowany"+ },+ "backToMarket": "Powrót do rynku asystentów",+ "deprecated": {+ "reasons": {+ "official": "Asystent został usunięty przez administratorów z powodu problemów z bezpieczeństwem lub polityką",+ "owner": "Właściciel asystenta samodzielnie go usunął lub odrzucił"+ },+ "subtitle": "Asystent, którego próbujesz odwiedzić, został odrzucony z jednego z poniższych powodów:",+ "title": "Asystent został odrzucony"+ },+ "support": "W przypadku jakichkolwiek problemów skopiuj link i wyślij zapytanie na adres <1>[email protected]</1>.",+ "unpublished": {+ "subtitle": "Asystent, którego próbujesz odwiedzić, jest obecnie w trakcie przeglądu wersji. W razie pytań skopiuj link i wyślij zapytanie na adres <1>[email protected]</1>.",+ "title": "Asystent w trakcie przeglądu"+ }+ },"suggestions": "Podobne rekomendacje","systemRole": "Ustawienia asystenta","tokenUsage": "Zużycie tokenów w promptach asystenta",diff --git a/locales/pl-PL/marketAuth.json b/locales/pl-PL/marketAuth.jsonnew file mode 100644index 00000000000..5dbaded0e0a--- /dev/null+++ b/locales/pl-PL/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Zamknij okno"+ },+ "messages": {+ "authFailed": "Autoryzacja nie powiodła się: {{error}}",+ "missingParams": "Brakujące parametry autoryzacji",+ "processing": "Trwa przetwarzanie autoryzacji...",+ "successWithCountdown": "{{message}} Okno zostanie automatycznie zamknięte za {{countdown}} sekund",+ "successWithRedirect": "Autoryzacja zakończona sukcesem! Przekierowywanie..."+ },+ "titles": {+ "error": "Autoryzacja nie powiodła się",+ "loading": "Autoryzacja LobeHub Market",+ "success": "Autoryzacja zakończona sukcesem"+ }+ },+ "errors": {+ "authorizationFailed": "Autoryzacja nie powiodła się, spróbuj ponownie.",+ "browserOnly": "Proces autoryzacji może być uruchomiony tylko w przeglądarce.",+ "codeConsumed": "Kod autoryzacyjny został już użyty, spróbuj ponownie.",+ "codeVerifierMissing": "Sesja autoryzacyjna jest nieważna, rozpocznij proces logowania od nowa.",+ "general": "Wystąpił błąd podczas autoryzacji, spróbuj ponownie.",+ "handoffFailed": "Nie udało się uzyskać wyniku autoryzacji, spróbuj ponownie.",+ "handoffTimeout": "Przekroczono czas autoryzacji, spróbuj ponownie po zakończeniu operacji w przeglądarce.",+ "oidcNotReady": "Usługa autoryzacji nie jest jeszcze gotowa, spróbuj ponownie później.",+ "openBrowserFailed": "Nie udało się otworzyć przeglądarki systemowej, spróbuj ponownie.",+ "openPopupFailed": "Nie udało się otworzyć okna autoryzacji, sprawdź ustawienia blokowania wyskakujących okienek w przeglądarce.",+ "popupClosed": "Okno autoryzacji zostało zamknięte przed zakończeniem procesu.",+ "sessionExpired": "Sesja autoryzacyjna wygasła, zaloguj się ponownie.",+ "stateMismatch": "Stan autoryzacji nie pasuje, spróbuj ponownie.",+ "stateMissing": "Nie znaleziono stanu autoryzacji, spróbuj ponownie."+ },+ "messages": {+ "loading": "Uruchamianie procesu autoryzacji...",+ "success": {+ "submit": "Autoryzacja zakończona sukcesem! Możesz teraz opublikować asystenta.",+ "upload": "Autoryzacja zakończona sukcesem! Możesz teraz opublikować nową wersję."+ }+ }+}diff --git a/locales/pl-PL/setting.json b/locales/pl-PL/setting.jsonindex 4889ffa8f95..4d0fd8b3af3 100644--- a/locales/pl-PL/setting.json+++ b/locales/pl-PL/setting.json@@ -2,6 +2,45 @@"about": {"title": "O nas"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Awatar",+ "description": "Opis",+ "name": "Nazwa",+ "tags": "Tagi",+ "title": "Informacje o Asystencie"+ },+ "chat": {+ "displayMode": "Tryb wyświetlania",+ "enableHistoryCount": "Włącz licznik historii wiadomości",+ "historyCount": "Liczba wiadomości w historii",+ "no": "Nie",+ "searchMode": "Tryb wyszukiwania",+ "title": "Preferencje czatu",+ "yes": "Tak"+ },+ "model": {+ "maxTokens": "Maksymalna liczba tokenów",+ "model": "Model",+ "provider": "Dostawca",+ "temperature": "Temperatura",+ "title": "Ustawienia modelu",+ "topP": "Wartość Top P"+ },+ "plugins": {+ "count": "Ustawienia wtyczek ({{count}})",+ "empty": "Brak zainstalowanych wtyczek",+ "title": "Zainstalowane wtyczki"+ },+ "role": {+ "systemRole": "Systemowy prompt",+ "title": "Ustawienia roli"+ },+ "value": {+ "unset": "Nieustawione",+ "untitled": "Asystent bez nazwy"+ }+ },"agentTab": {"chat": "Preferencje czatu","meta": "Informacje o asystencie",@@ -18,6 +57,8 @@},"title": "Analiza danych"},+ "checking": "Sprawdzanie...",+ "checkingPermissions": "Sprawdzanie uprawnień...","danger": {"clear": {"action": "Wyczyść teraz",@@ -146,6 +187,58 @@},"waitingForMore": "Więcej modeli jest obecnie w <1>planach dołączenia</1>, prosimy o cierpliwość"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Opisz główne zmiany i ulepszenia w tej wersji",+ "label": "Dziennik zmian",+ "maxLengthError": "Dziennik zmian nie może przekraczać 500 znaków",+ "placeholder": "Wprowadź dziennik zmian",+ "required": "Wprowadź dziennik zmian"+ },+ "comparison": {+ "local": "Lokalna wersja",+ "remote": "Opublikowana wersja"+ },+ "identifier": {+ "extra": "Identyfikator będzie unikalnym identyfikatorem asystenta. Zalecane są małe litery, cyfry i myślniki",+ "label": "Identyfikator asystenta",+ "lengthError": "Identyfikator powinien mieć od 3 do 50 znaków",+ "patternError": "Identyfikator może zawierać tylko małe litery, cyfry i myślniki",+ "placeholder": "Wprowadź unikalny identyfikator asystenta, np.: web-development",+ "required": "Wprowadź identyfikator asystenta"+ },+ "loading": {+ "fetchingRemote": "Ładowanie danych zdalnych...",+ "submit": "Publikowanie asystenta...",+ "upload": "Publikowanie nowej wersji..."+ },+ "messages": {+ "createVersionFailed": "Nie udało się utworzyć wersji: {{message}}",+ "fetchRemoteFailed": "Nie udało się pobrać danych zdalnego asystenta",+ "missingIdentifier": "Obecny asystent nie ma identyfikatora rynkowego",+ "notAuthenticated": "Zaloguj się na konto rynkowe",+ "publishFailed": "Publikacja nie powiodła się: {{message}}"+ },+ "submitButton": "Opublikuj",+ "title": {+ "submit": "Udostępnij w Rynku Asystentów",+ "upload": "Opublikuj nową wersję"+ }+ },+ "resultModal": {+ "message": "Asystent został przesłany do weryfikacji. Po zatwierdzeniu zostanie automatycznie opublikowany. Kliknij „Zobacz w Rynku”, aby zobaczyć opublikowanego asystenta.",+ "view": "Zobacz w Rynku"+ },+ "submit": {+ "button": "Udostępnij w Rynku",+ "tooltip": "Udostępnij asystenta w Rynku"+ },+ "upload": {+ "button": "Opublikuj nową wersję",+ "tooltip": "Opublikuj nową wersję w Rynku Asystentów"+ }+ },"message": {"success": "Pomyślnie zaktualizowano"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Prześlij asystenta",- "identifier": "Identyfikator asystenta",+ "identifier": "Identyfikator asystenta (identifier)","metaMiss": "Proszę uzupełnić informacje o asystencie przed przesłaniem, należy podać nazwę, opis i tagi","placeholder": "Wprowadź identyfikator asystenta, musi być unikalny, na przykład web-development","tooltips": "Udostępnij na rynku asystentów"diff --git a/locales/pt-BR/discover.json b/locales/pt-BR/discover.jsonindex 1ba43efb165..68a74d77980 100644--- a/locales/pt-BR/discover.json+++ b/locales/pt-BR/discover.json@@ -41,9 +41,29 @@"openingMessage": "Mensagem de Abertura","openingQuestions": "Perguntas Iniciais","title": "Configuração do Assistente"+ },+ "version": {+ "empty": "Nenhuma versão histórica disponível",+ "status": {+ "archived": "Arquivado",+ "deprecated": "Rejeitado",+ "unpublished": "Em revisão"+ },+ "table": {+ "isLatest": "Versão mais recente",+ "isValidated": "Validado",+ "publishAt": "Data de publicação",+ "version": "Número da versão"+ },+ "title": "Histórico de versões"}},"list": "Lista de Assistentes",+ "marketSource": {+ "label": "Alternar fonte do mercado",+ "legacy": "Mercado antigo",+ "new": "Novo mercado"+ },"more": "Mais","plugins": "Integrar plugins","recentSubmits": "Atualizações Recentes",@@ -51,10 +71,35 @@"createdAt": "Publicado Recentemente","identifier": "ID do Assistente","knowledgeCount": "Quantidade de Bases de Conhecimento",+ "myown": "Ver meus","pluginCount": "Quantidade de Plugins","title": "Nome do Assistente","tokenUsage": "Uso de Tokens"},+ "status": {+ "archived": {+ "reasons": {+ "official": "O assistente foi removido oficialmente por questões de segurança/política",+ "owner": "O proprietário do assistente o arquivou ou removeu voluntariamente"+ },+ "subtitle": "O assistente que você está tentando acessar foi arquivado pelos seguintes motivos possíveis:",+ "title": "Assistente arquivado"+ },+ "backToMarket": "Voltar ao mercado de assistentes",+ "deprecated": {+ "reasons": {+ "official": "O assistente foi removido oficialmente por questões de segurança/política",+ "owner": "O proprietário do assistente o rejeitou ou removeu voluntariamente"+ },+ "subtitle": "O assistente que você está tentando acessar foi rejeitado pelos seguintes motivos possíveis:",+ "title": "Assistente rejeitado"+ },+ "support": "Se tiver qualquer problema, copie o link e envie para <1>[email protected]</1> para obter suporte.",+ "unpublished": {+ "subtitle": "O assistente que você está tentando acessar está passando por revisão de versão. Se tiver dúvidas, copie o link e envie para <1>[email protected]</1> para obter suporte.",+ "title": "Assistente em revisão"+ }+ },"suggestions": "Sugestões Relacionadas","systemRole": "Configuração do Assistente","tokenUsage": "Uso de Tokens no Prompt do Assistente",diff --git a/locales/pt-BR/marketAuth.json b/locales/pt-BR/marketAuth.jsonnew file mode 100644index 00000000000..ef8d9975b1e--- /dev/null+++ b/locales/pt-BR/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Fechar janela"+ },+ "messages": {+ "authFailed": "Falha na autorização: {{error}}",+ "missingParams": "Parâmetros de autorização ausentes",+ "processing": "Processando autorização...",+ "successWithCountdown": "{{message}} A janela será fechada automaticamente em {{countdown}} segundos",+ "successWithRedirect": "Autorização bem-sucedida! Redirecionando..."+ },+ "titles": {+ "error": "Falha na autorização",+ "loading": "Autorização do LobeHub Market",+ "success": "Autorização bem-sucedida"+ }+ },+ "errors": {+ "authorizationFailed": "Falha na autorização, tente novamente.",+ "browserOnly": "O processo de autorização só pode ser iniciado em um navegador.",+ "codeConsumed": "O código de autorização já foi utilizado, tente novamente.",+ "codeVerifierMissing": "Sessão de autorização inválida, inicie o login novamente.",+ "general": "Ocorreu um erro na autorização, tente novamente.",+ "handoffFailed": "Não foi possível obter o resultado da autorização, tente novamente.",+ "handoffTimeout": "Tempo de autorização esgotado, conclua a operação no navegador e tente novamente.",+ "oidcNotReady": "O serviço de autorização ainda não está pronto, tente novamente mais tarde.",+ "openBrowserFailed": "Não foi possível abrir o navegador do sistema, tente novamente.",+ "openPopupFailed": "Não foi possível abrir a janela de autorização, verifique as configurações de bloqueio de pop-ups do navegador.",+ "popupClosed": "A janela de autorização foi fechada antes da conclusão.",+ "sessionExpired": "A sessão de autorização expirou, faça login novamente.",+ "stateMismatch": "Estado de autorização incompatível, tente novamente.",+ "stateMissing": "Estado de autorização não encontrado, tente novamente."+ },+ "messages": {+ "loading": "Iniciando o processo de autorização...",+ "success": {+ "submit": "Autorização bem-sucedida! Agora você pode publicar o assistente.",+ "upload": "Autorização bem-sucedida! Agora você pode publicar uma nova versão."+ }+ }+}diff --git a/locales/pt-BR/setting.json b/locales/pt-BR/setting.jsonindex f99703cdd91..7ef2946e2f8 100644--- a/locales/pt-BR/setting.json+++ b/locales/pt-BR/setting.json@@ -2,6 +2,45 @@"about": {"title": "Sobre"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Avatar",+ "description": "Descrição",+ "name": "Nome",+ "tags": "Tags",+ "title": "Informações do Assistente"+ },+ "chat": {+ "displayMode": "Modo de exibição",+ "enableHistoryCount": "Ativar contagem de mensagens anteriores",+ "historyCount": "Número de mensagens anteriores",+ "no": "Não",+ "searchMode": "Modo de busca",+ "title": "Preferências de conversa",+ "yes": "Sim"+ },+ "model": {+ "maxTokens": "Máximo de Tokens",+ "model": "Modelo",+ "provider": "Provedor",+ "temperature": "Temperatura",+ "title": "Configurações do Modelo",+ "topP": "Valor Top P"+ },+ "plugins": {+ "count": "Configurações de Plugins ({{count}})",+ "empty": "Nenhum plugin instalado",+ "title": "Plugins Instalados"+ },+ "role": {+ "systemRole": "Prompt do sistema",+ "title": "Configurações de Papel"+ },+ "value": {+ "unset": "Não definido",+ "untitled": "Assistente sem título"+ }+ },"agentTab": {"chat": "Preferências de bate-papo","meta": "Informações do assistente",@@ -18,6 +57,8 @@},"title": "Análise de dados"},+ "checking": "Verificando...",+ "checkingPermissions": "Verificando permissões...","danger": {"clear": {"action": "Limpar Agora",@@ -146,6 +187,58 @@},"waitingForMore": "Mais modelos estão sendo <1>planejados para serem adicionados</1>, aguarde ansiosamente"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Descreva as principais mudanças e melhorias desta versão",+ "label": "Registro de alterações",+ "maxLengthError": "O registro de alterações não pode exceder 500 caracteres",+ "placeholder": "Insira o registro de alterações",+ "required": "Por favor, insira o registro de alterações"+ },+ "comparison": {+ "local": "Versão local atual",+ "remote": "Versão publicada atual"+ },+ "identifier": {+ "extra": "O identificador será usado como a identificação única do assistente. Recomenda-se usar letras minúsculas, números e hífens",+ "label": "Identificador do Assistente",+ "lengthError": "O identificador deve ter entre 3 e 50 caracteres",+ "patternError": "O identificador pode conter apenas letras minúsculas, números e hífens",+ "placeholder": "Insira o identificador único do assistente, ex: web-development",+ "required": "Por favor, insira o identificador do assistente"+ },+ "loading": {+ "fetchingRemote": "Carregando dados remotos...",+ "submit": "Publicando assistente...",+ "upload": "Publicando nova versão..."+ },+ "messages": {+ "createVersionFailed": "Falha ao criar versão: {{message}}",+ "fetchRemoteFailed": "Falha ao obter dados do assistente remoto",+ "missingIdentifier": "O assistente atual ainda não possui um identificador de mercado",+ "notAuthenticated": "Por favor, faça login na conta do mercado",+ "publishFailed": "Falha na publicação: {{message}}"+ },+ "submitButton": "Publicar",+ "title": {+ "submit": "Compartilhar no Mercado de Assistentes",+ "upload": "Publicar Nova Versão"+ }+ },+ "resultModal": {+ "message": "O assistente foi enviado para revisão. Após aprovação, será publicado automaticamente. Clique em \"Ver no Mercado\" para visualizar o assistente publicado.",+ "view": "Ver no Mercado"+ },+ "submit": {+ "button": "Compartilhar no Mercado",+ "tooltip": "Compartilhar assistente no mercado"+ },+ "upload": {+ "button": "Publicar Nova Versão",+ "tooltip": "Publicar nova versão no mercado de assistentes"+ }+ },"message": {"success": "Atualização bem-sucedida"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Enviar Assistente",- "identifier": "Identificador do assistente",+ "identifier": "Identificador do Assistente (identifier)","metaMiss": "Por favor, complete as informações do assistente antes de enviar, incluindo nome, descrição e etiqueta","placeholder": "Insira o identificador único do assistente, como por exemplo, desenvolvimento-web","tooltips": "Compartilhar no mercado de assistentes"diff --git a/locales/ru-RU/discover.json b/locales/ru-RU/discover.jsonindex 990db329195..0c3c7cf0d75 100644--- a/locales/ru-RU/discover.json+++ b/locales/ru-RU/discover.json@@ -41,9 +41,29 @@"openingMessage": "Приветственное сообщение","openingQuestions": "Начальные вопросы","title": "Настройки ассистента"+ },+ "version": {+ "empty": "История версий отсутствует",+ "status": {+ "archived": "Архивировано",+ "deprecated": "Отклонено",+ "unpublished": "На модерации"+ },+ "table": {+ "isLatest": "Последняя версия",+ "isValidated": "Проверено",+ "publishAt": "Дата публикации",+ "version": "Номер версии"+ },+ "title": "История версий"}},"list": "Список помощников",+ "marketSource": {+ "label": "Переключить источник маркетплейса",+ "legacy": "Старый маркет",+ "new": "Новый маркет"+ },"more": "Больше","plugins": "Интеграция плагинов","recentSubmits": "Недавние обновления",@@ -51,10 +71,35 @@"createdAt": "Недавно опубликованные","identifier": "ID ассистента","knowledgeCount": "Количество баз знаний",+ "myown": "Мои ассистенты","pluginCount": "Количество плагинов","title": "Название ассистента","tokenUsage": "Использование токенов"},+ "status": {+ "archived": {+ "reasons": {+ "official": "Ассистент был удалён официально по причинам безопасности или политическим соображениям",+ "owner": "Владелец ассистента самостоятельно удалил или архивировал его"+ },+ "subtitle": "Ассистент, к которому вы пытаетесь получить доступ, был архивирован по одной из следующих причин:",+ "title": "Ассистент архивирован"+ },+ "backToMarket": "Вернуться в маркет ассистентов",+ "deprecated": {+ "reasons": {+ "official": "Ассистент был удалён официально по причинам безопасности или политическим соображениям",+ "owner": "Владелец ассистента самостоятельно удалил или отклонил его"+ },+ "subtitle": "Ассистент, к которому вы пытаетесь получить доступ, был отклонён по одной из следующих причин:",+ "title": "Ассистент отклонён"+ },+ "support": "Если у вас возникли вопросы, пожалуйста, скопируйте ссылку и отправьте её на <1>[email protected]</1> для консультации.",+ "unpublished": {+ "subtitle": "Ассистент, к которому вы пытаетесь получить доступ, находится на стадии модерации. Если у вас есть вопросы, скопируйте ссылку и отправьте её на <1>[email protected]</1> для консультации.",+ "title": "Ассистент на модерации"+ }+ },"suggestions": "Рекомендуемые","systemRole": "Настройки помощника","tokenUsage": "Использование токенов в подсказках ассистента",diff --git a/locales/ru-RU/marketAuth.json b/locales/ru-RU/marketAuth.jsonnew file mode 100644index 00000000000..350c5549458--- /dev/null+++ b/locales/ru-RU/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Закрыть окно"+ },+ "messages": {+ "authFailed": "Ошибка авторизации: {{error}}",+ "missingParams": "Отсутствуют параметры авторизации",+ "processing": "Обработка авторизации...",+ "successWithCountdown": "{{message}} Окно закроется автоматически через {{countdown}} секунд",+ "successWithRedirect": "Авторизация прошла успешно! Перенаправление..."+ },+ "titles": {+ "error": "Ошибка авторизации",+ "loading": "Авторизация LobeHub Market",+ "success": "Авторизация успешна"+ }+ },+ "errors": {+ "authorizationFailed": "Ошибка авторизации, пожалуйста, попробуйте снова.",+ "browserOnly": "Процесс авторизации можно запустить только в браузере.",+ "codeConsumed": "Код авторизации уже использован, пожалуйста, попробуйте снова.",+ "codeVerifierMissing": "Сеанс авторизации недействителен, пожалуйста, начните вход заново.",+ "general": "Произошла ошибка авторизации, пожалуйста, попробуйте снова.",+ "handoffFailed": "Не удалось получить результат авторизации, пожалуйста, попробуйте снова.",+ "handoffTimeout": "Время авторизации истекло, завершите процесс в браузере и повторите попытку.",+ "oidcNotReady": "Служба авторизации ещё не готова, пожалуйста, попробуйте позже.",+ "openBrowserFailed": "Не удалось открыть системный браузер, пожалуйста, попробуйте снова.",+ "openPopupFailed": "Не удалось открыть всплывающее окно авторизации, проверьте настройки блокировки всплывающих окон в браузере.",+ "popupClosed": "Окно авторизации было закрыто до завершения процесса.",+ "sessionExpired": "Сеанс авторизации истёк, пожалуйста, войдите снова.",+ "stateMismatch": "Несоответствие состояния авторизации, пожалуйста, попробуйте снова.",+ "stateMissing": "Состояние авторизации не найдено, пожалуйста, попробуйте снова."+ },+ "messages": {+ "loading": "Запуск процесса авторизации...",+ "success": {+ "submit": "Авторизация прошла успешно! Теперь вы можете опубликовать помощника.",+ "upload": "Авторизация прошла успешно! Теперь вы можете опубликовать новую версию."+ }+ }+}diff --git a/locales/ru-RU/setting.json b/locales/ru-RU/setting.jsonindex 934aa621df1..f5260642fbf 100644--- a/locales/ru-RU/setting.json+++ b/locales/ru-RU/setting.json@@ -2,6 +2,45 @@"about": {"title": "О нас"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Аватар",+ "description": "Описание",+ "name": "Имя",+ "tags": "Теги",+ "title": "Информация об ассистенте"+ },+ "chat": {+ "displayMode": "Режим отображения",+ "enableHistoryCount": "Включить подсчет истории сообщений",+ "historyCount": "Количество сообщений в истории",+ "no": "Нет",+ "searchMode": "Режим поиска",+ "title": "Настройки чата",+ "yes": "Да"+ },+ "model": {+ "maxTokens": "Максимальное количество токенов",+ "model": "Модель",+ "provider": "Провайдер",+ "temperature": "Температура",+ "title": "Настройки модели",+ "topP": "Значение Top P"+ },+ "plugins": {+ "count": "Настройки плагинов ({{count}})",+ "empty": "Плагины еще не установлены",+ "title": "Установленные плагины"+ },+ "role": {+ "systemRole": "Системная подсказка",+ "title": "Настройки роли"+ },+ "value": {+ "unset": "Не установлено",+ "untitled": "Безымянный ассистент"+ }+ },"agentTab": {"chat": "Предпочтения чата","meta": "Информация об ассистенте",@@ -18,6 +57,8 @@},"title": "Аналитика"},+ "checking": "Проверка...",+ "checkingPermissions": "Проверка прав доступа...","danger": {"clear": {"action": "Очистить сейчас",@@ -146,6 +187,58 @@},"waitingForMore": "Больше моделей доступно в <1>плане подключения</1>, ожидайте"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Опишите основные изменения и улучшения в этой версии",+ "label": "Журнал изменений",+ "maxLengthError": "Журнал изменений не должен превышать 500 символов",+ "placeholder": "Пожалуйста, введите журнал изменений",+ "required": "Пожалуйста, введите журнал изменений"+ },+ "comparison": {+ "local": "Текущая локальная версия",+ "remote": "Текущая опубликованная версия"+ },+ "identifier": {+ "extra": "Идентификатор будет использоваться как уникальный идентификатор ассистента. Рекомендуется использовать строчные буквы, цифры и дефисы",+ "label": "Идентификатор ассистента",+ "lengthError": "Длина идентификатора должна быть от 3 до 50 символов",+ "patternError": "Идентификатор может содержать только строчные буквы, цифры и дефисы",+ "placeholder": "Пожалуйста, введите уникальный идентификатор ассистента, например: web-development",+ "required": "Пожалуйста, введите идентификатор ассистента"+ },+ "loading": {+ "fetchingRemote": "Загрузка удаленных данных...",+ "submit": "Публикация ассистента...",+ "upload": "Публикация новой версии..."+ },+ "messages": {+ "createVersionFailed": "Не удалось создать версию: {{message}}",+ "fetchRemoteFailed": "Не удалось получить данные удаленного ассистента",+ "missingIdentifier": "У текущего ассистента нет идентификатора для маркетплейса",+ "notAuthenticated": "Пожалуйста, войдите в аккаунт маркетплейса",+ "publishFailed": "Ошибка публикации: {{message}}"+ },+ "submitButton": "Опубликовать",+ "title": {+ "submit": "Поделиться в маркетплейсе ассистентов",+ "upload": "Опубликовать новую версию"+ }+ },+ "resultModal": {+ "message": "Ассистент отправлен на модерацию. После одобрения он будет автоматически опубликован. Нажмите «Посмотреть в маркетплейсе», чтобы увидеть опубликованного ассистента.",+ "view": "Посмотреть в маркетплейсе"+ },+ "submit": {+ "button": "Поделиться в маркетплейсе",+ "tooltip": "Поделиться ассистентом в маркетплейсе"+ },+ "upload": {+ "button": "Опубликовать новую версию",+ "tooltip": "Опубликовать новую версию в маркетплейсе ассистентов"+ }+ },"message": {"success": "Успешно обновлено"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Отправить агента",- "identifier": "Идентификатор агента",+ "identifier": "Идентификатор ассистента (identifier)","metaMiss": "Пожалуйста, заполните информацию о помощнике перед отправкой. Необходимо указать имя, описание и теги","placeholder": "Введите уникальный идентификатор агента, например, 'web-development'","tooltips": "Поделиться в магазине агентов"diff --git a/locales/tr-TR/discover.json b/locales/tr-TR/discover.jsonindex c78a2c20ade..7973af6dba2 100644--- a/locales/tr-TR/discover.json+++ b/locales/tr-TR/discover.json@@ -41,9 +41,29 @@"openingMessage": "Açılış Mesajı","openingQuestions": "Açılış Soruları","title": "Asistan Ayarları"+ },+ "version": {+ "empty": "Henüz geçmiş sürüm yok",+ "status": {+ "archived": "Arşivlendi",+ "deprecated": "Reddedildi",+ "unpublished": "İnceleniyor"+ },+ "table": {+ "isLatest": "En Son Sürüm",+ "isValidated": "Doğrulandı",+ "publishAt": "Yayın Tarihi",+ "version": "Sürüm Numarası"+ },+ "title": "Sürüm Geçmişi"}},"list": "Asistan Listesi",+ "marketSource": {+ "label": "Pazar Kaynağını Değiştir",+ "legacy": "Eski Pazar",+ "new": "Yeni Pazar"+ },"more": "Daha Fazla","plugins": "Entegre Eklentiler","recentSubmits": "Son Güncellemeler",@@ -51,10 +71,35 @@"createdAt": "En Son Yayınlanan","identifier": "Asistan ID","knowledgeCount": "Bilgi Tabanı Sayısı",+ "myown": "Benimkileri Görüntüle","pluginCount": "Eklenti Sayısı","title": "Asistan Adı","tokenUsage": "Token Kullanımı"},+ "status": {+ "archived": {+ "reasons": {+ "official": "Asistan güvenlik/siyasi nedenlerle resmi olarak yayından kaldırıldı",+ "owner": "Asistanın geliştiricisi tarafından isteğe bağlı olarak yayından kaldırıldı/arşivlendi"+ },+ "subtitle": "Erişmeye çalıştığınız asistan aşağıdaki olası nedenlerden dolayı arşivlenmiştir:",+ "title": "Asistan Arşivlendi"+ },+ "backToMarket": "Asistan Pazarına Dön",+ "deprecated": {+ "reasons": {+ "official": "Asistan güvenlik/siyasi nedenlerle resmi olarak yayından kaldırıldı",+ "owner": "Asistanın geliştiricisi tarafından isteğe bağlı olarak yayından kaldırıldı/reddedildi"+ },+ "subtitle": "Erişmeye çalıştığınız asistan aşağıdaki olası nedenlerden dolayı reddedilmiştir:",+ "title": "Asistan Reddedildi"+ },+ "support": "Herhangi bir sorun için lütfen bağlantıyı kopyalayıp <1>[email protected]</1> adresine göndererek destek alın.",+ "unpublished": {+ "subtitle": "Erişmeye çalıştığınız asistan şu anda sürüm incelemesinde. Sorularınız varsa bağlantıyı kopyalayıp <1>[email protected]</1> adresine gönderin.",+ "title": "Asistan İnceleniyor"+ }+ },"suggestions": "İlgili Öneriler","systemRole": "Asistan Ayarları","tokenUsage": "Asistan İpucu Token Kullanımı",diff --git a/locales/tr-TR/marketAuth.json b/locales/tr-TR/marketAuth.jsonnew file mode 100644index 00000000000..2cedc6918f0--- /dev/null+++ b/locales/tr-TR/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Pencereyi Kapat"+ },+ "messages": {+ "authFailed": "Yetkilendirme başarısız: {{error}}",+ "missingParams": "Yetkilendirme parametreleri eksik",+ "processing": "Yetkilendirme işleniyor...",+ "successWithCountdown": "{{message}} Pencere {{countdown}} saniye içinde otomatik olarak kapanacak",+ "successWithRedirect": "Yetkilendirme başarılı! Yönlendiriliyor..."+ },+ "titles": {+ "error": "Yetkilendirme Başarısız",+ "loading": "LobeHub Market Yetkilendirmesi",+ "success": "Yetkilendirme Başarılı"+ }+ },+ "errors": {+ "authorizationFailed": "Yetkilendirme başarısız, lütfen tekrar deneyin.",+ "browserOnly": "Yetkilendirme süreci yalnızca tarayıcıda başlatılabilir.",+ "codeConsumed": "Yetkilendirme kodu zaten kullanılmış, lütfen tekrar deneyin.",+ "codeVerifierMissing": "Yetkilendirme oturumu geçersiz, lütfen giriş sürecini yeniden başlatın.",+ "general": "Yetkilendirme sırasında bir hata oluştu, lütfen tekrar deneyin.",+ "handoffFailed": "Yetkilendirme sonucu alınamadı, lütfen tekrar deneyin.",+ "handoffTimeout": "Yetkilendirme zaman aşımına uğradı, lütfen tarayıcıda işlemi tamamladıktan sonra tekrar deneyin.",+ "oidcNotReady": "Yetkilendirme hizmeti henüz hazır değil, lütfen daha sonra tekrar deneyin.",+ "openBrowserFailed": "Sistem tarayıcısı açılamadı, lütfen tekrar deneyin.",+ "openPopupFailed": "Yetkilendirme penceresi açılamadı, lütfen tarayıcınızın açılır pencere engelleme ayarlarını kontrol edin.",+ "popupClosed": "Yetkilendirme penceresi tamamlanmadan kapatıldı.",+ "sessionExpired": "Yetkilendirme oturumu sona erdi, lütfen tekrar giriş yapın.",+ "stateMismatch": "Yetkilendirme durumu uyuşmuyor, lütfen tekrar deneyin.",+ "stateMissing": "Yetkilendirme durumu bulunamadı, lütfen tekrar deneyin."+ },+ "messages": {+ "loading": "Yetkilendirme süreci başlatılıyor...",+ "success": {+ "submit": "Yetkilendirme başarılı! Artık asistan yayınlayabilirsiniz.",+ "upload": "Yetkilendirme başarılı! Artık yeni bir sürüm yayınlayabilirsiniz."+ }+ }+}diff --git a/locales/tr-TR/setting.json b/locales/tr-TR/setting.jsonindex 3714850a3da..ab390561a67 100644--- a/locales/tr-TR/setting.json+++ b/locales/tr-TR/setting.json@@ -2,6 +2,45 @@"about": {"title": "Hakkında"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Avatar",+ "description": "Açıklama",+ "name": "Ad",+ "tags": "Etiketler",+ "title": "Asistan Bilgileri"+ },+ "chat": {+ "displayMode": "Görüntüleme Modu",+ "enableHistoryCount": "Geçmiş Mesaj Sayısını Etkinleştir",+ "historyCount": "Geçmiş Mesaj Sayısı",+ "no": "Hayır",+ "searchMode": "Arama Modu",+ "title": "Sohbet Tercihleri",+ "yes": "Evet"+ },+ "model": {+ "maxTokens": "Maksimum Token Sayısı",+ "model": "Model",+ "provider": "Sağlayıcı",+ "temperature": "Sıcaklık",+ "title": "Model Ayarları",+ "topP": "Top P Değeri"+ },+ "plugins": {+ "count": "Eklenti Ayarları ({{count}})",+ "empty": "Henüz eklenti yüklenmedi",+ "title": "Yüklü Eklentiler"+ },+ "role": {+ "systemRole": "Sistem İpucu",+ "title": "Rol Ayarları"+ },+ "value": {+ "unset": "Ayarlanmadı",+ "untitled": "İsimsiz Asistan"+ }+ },"agentTab": {"chat": "Sohbet Tercihi","meta": "Asistan Bilgisi",@@ -18,6 +57,8 @@},"title": "Analitik"},+ "checking": "Kontrol ediliyor...",+ "checkingPermissions": "İzinler kontrol ediliyor...","danger": {"clear": {"action": "Temizle",@@ -146,6 +187,58 @@},"waitingForMore": "Daha fazla model eklenmesi planlanıyor"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Bu sürümdeki başlıca değişiklikleri ve iyileştirmeleri açıklayın",+ "label": "Değişiklik Günlüğü",+ "maxLengthError": "Değişiklik günlüğü 500 karakteri geçemez",+ "placeholder": "Lütfen değişiklik günlüğünü girin",+ "required": "Lütfen değişiklik günlüğünü girin"+ },+ "comparison": {+ "local": "Yerel Mevcut Sürüm",+ "remote": "Yayımlanmış Mevcut Sürüm"+ },+ "identifier": {+ "extra": "Tanımlayıcı, asistanın benzersiz kimliği olarak kullanılacaktır. Küçük harf, rakam ve tire kullanmanız önerilir",+ "label": "Asistan Tanımlayıcısı",+ "lengthError": "Tanımlayıcı uzunluğu 3 ile 50 karakter arasında olmalıdır",+ "patternError": "Tanımlayıcı yalnızca küçük harf, rakam ve tire içerebilir",+ "placeholder": "Lütfen asistanın benzersiz tanımlayıcısını girin, örn: web-development",+ "required": "Lütfen asistan tanımlayıcısını girin"+ },+ "loading": {+ "fetchingRemote": "Uzak veriler yükleniyor...",+ "submit": "Asistan yayımlanıyor...",+ "upload": "Yeni sürüm yayımlanıyor..."+ },+ "messages": {+ "createVersionFailed": "Sürüm oluşturulamadı: {{message}}",+ "fetchRemoteFailed": "Uzak asistan verileri alınamadı",+ "missingIdentifier": "Bu asistana henüz bir pazar tanımlayıcısı atanmadı",+ "notAuthenticated": "Lütfen önce pazar hesabınıza giriş yapın",+ "publishFailed": "Yayımlama başarısız: {{message}}"+ },+ "submitButton": "Yayımla",+ "title": {+ "submit": "Asistan Pazarında Paylaş",+ "upload": "Yeni Sürüm Yayımla"+ }+ },+ "resultModal": {+ "message": "Asistan incelemeye gönderildi, onaylandıktan sonra otomatik olarak yayımlanacaktır. Yayımlanan asistanı görmek için 'Pazarda Görüntüle'ye tıklayın.",+ "view": "Pazarda Görüntüle"+ },+ "submit": {+ "button": "Pazarda Paylaş",+ "tooltip": "Asistanı pazarda paylaş"+ },+ "upload": {+ "button": "Yeni Sürüm Yayımla",+ "tooltip": "Asistan pazarına yeni sürüm yayımla"+ }+ },"message": {"success": "Güncelleme başarılı"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Asistan Gönder",- "identifier": "Asistan Kimliği",+ "identifier": "Asistan Tanımlayıcısı (identifier)","metaMiss": "Lütfen göndermeden önce asistan bilgilerini tamamlayın. Bu, ad, açıklama ve etiketleri içermelidir.","placeholder": "Asistan için benzersiz bir kimlik girin, örneğin web-geliştirme","tooltips": "Asistan pazarına paylaşın"diff --git a/locales/vi-VN/discover.json b/locales/vi-VN/discover.jsonindex 6953c7dd60a..4c19a5a2caa 100644--- a/locales/vi-VN/discover.json+++ b/locales/vi-VN/discover.json@@ -41,9 +41,29 @@"openingMessage": "Tin nhắn mở đầu","openingQuestions": "Câu hỏi mở đầu","title": "Cài đặt trợ lý"+ },+ "version": {+ "empty": "Chưa có phiên bản lịch sử",+ "status": {+ "archived": "Đã lưu trữ",+ "deprecated": "Đã từ chối",+ "unpublished": "Đang chờ duyệt"+ },+ "table": {+ "isLatest": "Phiên bản mới nhất",+ "isValidated": "Đã xác minh",+ "publishAt": "Ngày phát hành",+ "version": "Số phiên bản"+ },+ "title": "Lịch sử phiên bản"}},"list": "Danh sách trợ lý",+ "marketSource": {+ "label": "Chuyển đổi nguồn thị trường",+ "legacy": "Thị trường cũ",+ "new": "Thị trường mới"+ },"more": "Thêm","plugins": "Tích hợp plugin","recentSubmits": "Cập nhật gần đây",@@ -51,10 +71,35 @@"createdAt": "Mới phát hành","identifier": "ID trợ lý","knowledgeCount": "Số kho tri thức",+ "myown": "Xem của tôi","pluginCount": "Số plugin","title": "Tên trợ lý","tokenUsage": "Lượng Token sử dụng"},+ "status": {+ "archived": {+ "reasons": {+ "official": "Trợ lý bị gỡ bỏ do vấn đề an toàn/chính trị bởi cơ quan chính thức",+ "owner": "Chủ sở hữu của trợ lý đã chủ động gỡ bỏ/lưu trữ trợ lý này"+ },+ "subtitle": "Trợ lý bạn đang truy cập đã bị lưu trữ vì một trong các lý do sau:",+ "title": "Trợ lý đã bị lưu trữ"+ },+ "backToMarket": "Quay lại thị trường trợ lý",+ "deprecated": {+ "reasons": {+ "official": "Trợ lý bị gỡ bỏ do vấn đề an toàn/chính trị bởi cơ quan chính thức",+ "owner": "Chủ sở hữu của trợ lý đã chủ động gỡ bỏ/từ chối trợ lý này"+ },+ "subtitle": "Trợ lý bạn đang truy cập đã bị từ chối vì một trong các lý do sau:",+ "title": "Trợ lý đã bị từ chối"+ },+ "support": "Nếu gặp bất kỳ vấn đề nào, vui lòng sao chép liên kết và gửi đến <1>[email protected]</1> để được hỗ trợ.",+ "unpublished": {+ "subtitle": "Trợ lý bạn đang truy cập hiện đang trong quá trình kiểm duyệt phiên bản. Nếu có thắc mắc, vui lòng sao chép liên kết và gửi câu hỏi đến <1>[email protected]</1> để được hỗ trợ.",+ "title": "Trợ lý đang chờ duyệt"+ }+ },"suggestions": "Gợi ý liên quan","systemRole": "Cài đặt trợ lý","tokenUsage": "Lượng Token sử dụng cho lời nhắc trợ lý",diff --git a/locales/vi-VN/marketAuth.json b/locales/vi-VN/marketAuth.jsonnew file mode 100644index 00000000000..b079e58dc68--- /dev/null+++ b/locales/vi-VN/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "Đóng cửa sổ"+ },+ "messages": {+ "authFailed": "Xác thực thất bại: {{error}}",+ "missingParams": "Thiếu tham số xác thực",+ "processing": "Đang xử lý xác thực...",+ "successWithCountdown": "{{message}} Cửa sổ sẽ tự động đóng sau {{countdown}} giây",+ "successWithRedirect": "Xác thực thành công! Đang chuyển hướng..."+ },+ "titles": {+ "error": "Xác thực thất bại",+ "loading": "Xác thực LobeHub Market",+ "success": "Xác thực thành công"+ }+ },+ "errors": {+ "authorizationFailed": "Xác thực thất bại, vui lòng thử lại.",+ "browserOnly": "Quy trình xác thực chỉ có thể bắt đầu trong trình duyệt.",+ "codeConsumed": "Mã xác thực đã được sử dụng, vui lòng thử lại.",+ "codeVerifierMissing": "Phiên xác thực không hợp lệ, vui lòng đăng nhập lại.",+ "general": "Đã xảy ra lỗi xác thực, vui lòng thử lại.",+ "handoffFailed": "Không thể lấy kết quả xác thực, vui lòng thử lại.",+ "handoffTimeout": "Hết thời gian xác thực, vui lòng hoàn tất thao tác trong trình duyệt rồi thử lại.",+ "oidcNotReady": "Dịch vụ xác thực chưa sẵn sàng, vui lòng thử lại sau.",+ "openBrowserFailed": "Không thể mở trình duyệt hệ thống, vui lòng thử lại.",+ "openPopupFailed": "Không thể mở cửa sổ xác thực, vui lòng kiểm tra cài đặt chặn cửa sổ bật lên của trình duyệt.",+ "popupClosed": "Cửa sổ xác thực đã bị đóng trước khi hoàn tất.",+ "sessionExpired": "Phiên xác thực đã hết hạn, vui lòng đăng nhập lại.",+ "stateMismatch": "Trạng thái xác thực không khớp, vui lòng thử lại.",+ "stateMissing": "Không tìm thấy trạng thái xác thực, vui lòng thử lại."+ },+ "messages": {+ "loading": "Đang khởi động quy trình xác thực...",+ "success": {+ "submit": "Xác thực thành công! Bây giờ bạn có thể xuất bản trợ lý.",+ "upload": "Xác thực thành công! Bây giờ bạn có thể xuất bản phiên bản mới."+ }+ }+}diff --git a/locales/vi-VN/setting.json b/locales/vi-VN/setting.jsonindex 28f1efb2e46..7d9b50df64a 100644--- a/locales/vi-VN/setting.json+++ b/locales/vi-VN/setting.json@@ -2,6 +2,45 @@"about": {"title": "Về chúng tôi"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "Ảnh đại diện",+ "description": "Mô tả",+ "name": "Tên",+ "tags": "Thẻ",+ "title": "Thông tin trợ lý"+ },+ "chat": {+ "displayMode": "Chế độ hiển thị",+ "enableHistoryCount": "Bật đếm tin nhắn lịch sử",+ "historyCount": "Số lượng tin nhắn lịch sử",+ "no": "Không",+ "searchMode": "Chế độ tìm kiếm",+ "title": "Tùy chọn trò chuyện",+ "yes": "Có"+ },+ "model": {+ "maxTokens": "Số lượng Token tối đa",+ "model": "Mô hình",+ "provider": "Nhà cung cấp",+ "temperature": "Nhiệt độ",+ "title": "Cài đặt mô hình",+ "topP": "Giá trị Top P"+ },+ "plugins": {+ "count": "Cài đặt plugin ({{count}})",+ "empty": "Chưa cài đặt plugin nào",+ "title": "Plugin đã cài đặt"+ },+ "role": {+ "systemRole": "Lời nhắc hệ thống",+ "title": "Cài đặt vai trò"+ },+ "value": {+ "unset": "Chưa thiết lập",+ "untitled": "Trợ lý chưa có tên"+ }+ },"agentTab": {"chat": "Tùy chọn Trò chuyện","meta": "Thông tin Trợ lý",@@ -18,6 +57,8 @@},"title": "Thống kê dữ liệu"},+ "checking": "Đang kiểm tra...",+ "checkingPermissions": "Đang kiểm tra quyền...","danger": {"clear": {"action": "Xóa ngay",@@ -146,6 +187,58 @@},"waitingForMore": "Có thêm mô hình đang <1>được lên kế hoạch tích hợp</1>, hãy chờ đợi"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "Mô tả những thay đổi và cải tiến chính trong phiên bản này",+ "label": "Nhật ký thay đổi",+ "maxLengthError": "Nhật ký thay đổi không được vượt quá 500 ký tự",+ "placeholder": "Vui lòng nhập nhật ký thay đổi",+ "required": "Vui lòng nhập nhật ký thay đổi"+ },+ "comparison": {+ "local": "Phiên bản hiện tại trên máy",+ "remote": "Phiên bản đã phát hành"+ },+ "identifier": {+ "extra": "Định danh sẽ là mã định danh duy nhất của trợ lý, nên sử dụng chữ thường, số và dấu gạch ngang",+ "label": "Định danh trợ lý",+ "lengthError": "Độ dài định danh phải từ 3 đến 50 ký tự",+ "patternError": "Định danh chỉ được chứa chữ thường, số và dấu gạch ngang",+ "placeholder": "Vui lòng nhập định danh duy nhất cho trợ lý, ví dụ: web-development",+ "required": "Vui lòng nhập định danh trợ lý"+ },+ "loading": {+ "fetchingRemote": "Đang tải dữ liệu từ xa...",+ "submit": "Đang phát hành trợ lý...",+ "upload": "Đang phát hành phiên bản mới..."+ },+ "messages": {+ "createVersionFailed": "Tạo phiên bản thất bại: {{message}}",+ "fetchRemoteFailed": "Không thể lấy dữ liệu trợ lý từ xa",+ "missingIdentifier": "Trợ lý hiện tại chưa có định danh thị trường",+ "notAuthenticated": "Vui lòng đăng nhập tài khoản thị trường trước",+ "publishFailed": "Phát hành thất bại: {{message}}"+ },+ "submitButton": "Phát hành",+ "title": {+ "submit": "Chia sẻ lên thị trường trợ lý",+ "upload": "Phát hành phiên bản mới"+ }+ },+ "resultModal": {+ "message": "Trợ lý đã được gửi để kiểm duyệt, sẽ tự động hiển thị sau khi được phê duyệt. Nhấn “Xem trên thị trường” để xem trợ lý đã phát hành.",+ "view": "Xem trên thị trường"+ },+ "submit": {+ "button": "Chia sẻ lên thị trường",+ "tooltip": "Chia sẻ trợ lý lên thị trường"+ },+ "upload": {+ "button": "Phát hành phiên bản mới",+ "tooltip": "Phát hành phiên bản mới lên thị trường trợ lý"+ }+ },"message": {"success": "Cập nhật thành công"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "Gửi trợ lý",- "identifier": "Nhận dạng trợ lý",+ "identifier": "Định danh trợ lý (identifier)","metaMiss": "Vui lòng điền đầy đủ thông tin trợ lý trước khi gửi, cần bao gồm tên, mô tả và nhãn","placeholder": "Vui lòng nhập nhận dạng trợ lý, cần phải duy nhất, ví dụ như phát triển web","tooltips": "Chia sẻ lên thị trường trợ lý"diff --git a/locales/zh-CN/discover.json b/locales/zh-CN/discover.jsonindex 99988018859..f8c6beb98f1 100644--- a/locales/zh-CN/discover.json+++ b/locales/zh-CN/discover.json@@ -41,9 +41,29 @@"openingMessage": "开场消息","openingQuestions": "开场问题","title": "助手设定"+ },+ "version": {+ "empty": "暂无历史版本",+ "status": {+ "archived": "已归档",+ "deprecated": "已拒绝",+ "unpublished": "审核中"+ },+ "table": {+ "isLatest": "最新版本",+ "isValidated": "已验证",+ "publishAt": "发布日期",+ "version": "版本号"+ },+ "title": "版本历史"}},"list": "助手列表",+ "marketSource": {+ "label": "切换市场源",+ "legacy": "旧市场",+ "new": "新市场"+ },"more": "更多","plugins": "集成插件","recentSubmits": "最近更新",@@ -51,11 +71,36 @@"createdAt": "最近发布","identifier": "助手 ID","knowledgeCount": "知识库数量",+ "myown": "查看我的","pluginCount": "插件数量","title": "助手名称","tokenUsage": "Token 使用量"},"suggestions": "相关推荐",+ "status": {+ "archived": {+ "reasons": {+ "official": "助手有安全/政治等问题,被官方下架",+ "owner": "开发助手的 owner 主动下架/归档该助手"+ },+ "subtitle": "当前访问的助手已经因为以下可能的原因被归档了:",+ "title": "助手已被归档"+ },+ "backToMarket": "返回助手市场",+ "deprecated": {+ "reasons": {+ "official": "助手有安全/政治等问题,被官方下架",+ "owner": "开发助手的 owner 主动下架/拒绝该助手"+ },+ "subtitle": "当前访问的助手已经因为以下可能的原因被拒绝了:",+ "title": "助手已被拒绝"+ },+ "support": "有各种问题请复制链接发送到 <1>[email protected]</1> 进行咨询。",+ "unpublished": {+ "subtitle": "当前访问的助手正在进行版本审核中,如果有疑问复制链接发送问题到 <1>[email protected]</1> 进行咨询。",+ "title": "助手正在审核中"+ }+ },"systemRole": "助手设定","tokenUsage": "助手提示词 Token 使用量","try": "试一下",diff --git a/locales/zh-CN/marketAuth.json b/locales/zh-CN/marketAuth.jsonnew file mode 100644index 00000000000..324175a7795--- /dev/null+++ b/locales/zh-CN/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "关闭窗口"+ },+ "messages": {+ "authFailed": "授权失败: {{error}}",+ "missingParams": "授权参数缺失",+ "processing": "正在处理授权...",+ "successWithCountdown": "{{message}} 窗口将在 {{countdown}} 秒后自动关闭",+ "successWithRedirect": "授权成功!正在跳转..."+ },+ "titles": {+ "error": "授权失败",+ "loading": "LobeHub Market 授权",+ "success": "授权成功"+ }+ },+ "errors": {+ "authorizationFailed": "授权失败,请重试。",+ "browserOnly": "授权流程只能在浏览器中发起。",+ "codeConsumed": "授权码已被使用,请重新尝试。",+ "codeVerifierMissing": "授权会话无效,请重新发起登录流程。",+ "general": "授权出现错误,请重试。",+ "handoffFailed": "无法获取授权结果,请重试。",+ "handoffTimeout": "授权超时,请在浏览器中完成操作后重试。",+ "oidcNotReady": "授权服务尚未就绪,请稍后再试。",+ "openBrowserFailed": "无法打开系统浏览器,请重试。",+ "openPopupFailed": "无法打开授权弹窗,请检查浏览器的弹窗拦截设置。",+ "popupClosed": "授权窗口未完成即被关闭。",+ "sessionExpired": "授权会话已过期,请重新登录。",+ "stateMismatch": "授权状态不匹配,请重试。",+ "stateMissing": "未找到授权状态,请重试。"+ },+ "messages": {+ "loading": "正在启动授权流程...",+ "success": {+ "submit": "授权成功!现在可以发布助手了。",+ "upload": "授权成功!现在可以发布新版本了。"+ }+ }+}diff --git a/locales/zh-CN/setting.json b/locales/zh-CN/setting.jsonindex 641166aa733..154d857fc31 100644--- a/locales/zh-CN/setting.json+++ b/locales/zh-CN/setting.json@@ -2,6 +2,45 @@"about": {"title": "关于"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "头像",+ "description": "描述",+ "name": "名称",+ "tags": "标签",+ "title": "助手信息"+ },+ "chat": {+ "displayMode": "展示模式",+ "enableHistoryCount": "启用历史消息计数",+ "historyCount": "历史消息数量",+ "no": "否",+ "searchMode": "搜索模式",+ "title": "聊天偏好",+ "yes": "是"+ },+ "model": {+ "maxTokens": "最大 Token 数",+ "model": "模型",+ "provider": "服务商",+ "temperature": "温度",+ "title": "模型设置",+ "topP": "Top P 值"+ },+ "plugins": {+ "count": "插件设置({{count}})",+ "empty": "尚未安装插件",+ "title": "已安装插件"+ },+ "role": {+ "systemRole": "系统提示词",+ "title": "角色设置"+ },+ "value": {+ "unset": "未设置",+ "untitled": "未命名助手"+ }+ },"agentTab": {"chat": "聊天偏好","meta": "助手信息",@@ -18,6 +57,8 @@},"title": "数据统计"},+ "checking": "检查中...",+ "checkingPermissions": "检查权限中...","danger": {"clear": {"action": "立即清除",@@ -146,6 +187,58 @@},"waitingForMore": "更多模型正在 <1>计划接入</1> 中,敬请期待"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "描述此版本的主要变更和改进",+ "label": "变更日志",+ "maxLengthError": "变更日志不能超过500个字符",+ "placeholder": "请输入变更日志",+ "required": "请输入变更日志"+ },+ "comparison": {+ "local": "本地当前版本",+ "remote": "当前发布版本"+ },+ "identifier": {+ "extra": "标识符将作为助手的唯一标识,建议使用小写字母、数字和连字符",+ "label": "助手标识符",+ "lengthError": "标识符长度应在3-50个字符之间",+ "patternError": "标识符只能包含小写字母、数字和连字符",+ "placeholder": "请输入助手的唯一标识符,如: web-development",+ "required": "请输入助手标识符"+ },+ "loading": {+ "fetchingRemote": "正在加载远程数据...",+ "submit": "正在发布助手...",+ "upload": "正在发布新版本..."+ },+ "messages": {+ "createVersionFailed": "版本创建失败: {{message}}",+ "fetchRemoteFailed": "获取远程助手数据失败",+ "missingIdentifier": "当前助手还没有市场标识符",+ "notAuthenticated": "请先登录市场账户",+ "publishFailed": "发布失败: {{message}}"+ },+ "submitButton": "发布",+ "title": {+ "submit": "分享到助手市场",+ "upload": "发布新版本"+ }+ },+ "resultModal": {+ "message": "助手已提交审核,审核通过后将自动上线。点击「在市场查看」查看已发布的助手。",+ "view": "在市场查看"+ },+ "submit": {+ "button": "分享到市场",+ "tooltip": "分享助手到市场"+ },+ "upload": {+ "button": "发布新版本",+ "tooltip": "发布新版本到助手市场"+ }+ },"message": {"success": "更新成功"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "提交助手",- "identifier": "identifier 助手标识符",+ "identifier": "助手标识符(identifier)","metaMiss": "请补全助手信息后提交,需要包含名称、描述和标签","placeholder": "请输入助手的标识符,需要是唯一的,比如 web-development","tooltips": "分享到助手市场"diff --git a/locales/zh-TW/discover.json b/locales/zh-TW/discover.jsonindex 373cabb14ff..92218792e25 100644--- a/locales/zh-TW/discover.json+++ b/locales/zh-TW/discover.json@@ -41,9 +41,29 @@"openingMessage": "開場訊息","openingQuestions": "開場問題","title": "助理設定"+ },+ "version": {+ "empty": "暫無歷史版本",+ "status": {+ "archived": "已封存",+ "deprecated": "已拒絕",+ "unpublished": "審核中"+ },+ "table": {+ "isLatest": "最新版本",+ "isValidated": "已驗證",+ "publishAt": "發佈日期",+ "version": "版本號"+ },+ "title": "版本歷史"}},"list": "助手列表",+ "marketSource": {+ "label": "切換市集來源",+ "legacy": "舊市集",+ "new": "新市集"+ },"more": "更多","plugins": "集成插件","recentSubmits": "最近更新",@@ -51,10 +71,35 @@"createdAt": "最近發布","identifier": "助理 ID","knowledgeCount": "知識庫數量",+ "myown": "查看我的","pluginCount": "外掛數量","title": "助理名稱","tokenUsage": "Token 使用量"},+ "status": {+ "archived": {+ "reasons": {+ "official": "助手因安全/政治等問題被官方下架",+ "owner": "開發助手的擁有者主動下架/封存該助手"+ },+ "subtitle": "當前訪問的助手已因以下可能原因被封存:",+ "title": "助手已被封存"+ },+ "backToMarket": "返回助手市集",+ "deprecated": {+ "reasons": {+ "official": "助手因安全/政治等問題被官方下架",+ "owner": "開發助手的擁有者主動下架/拒絕該助手"+ },+ "subtitle": "當前訪問的助手已因以下可能原因被拒絕:",+ "title": "助手已被拒絕"+ },+ "support": "如有任何問題,請複製連結並發送至 <1>[email protected]</1> 進行諮詢。",+ "unpublished": {+ "subtitle": "當前訪問的助手正在進行版本審核中,如有疑問請複製連結並發送問題至 <1>[email protected]</1> 進行諮詢。",+ "title": "助手正在審核中"+ }+ },"suggestions": "相關推薦","systemRole": "助手設定","tokenUsage": "助理提示詞 Token 使用量",diff --git a/locales/zh-TW/marketAuth.json b/locales/zh-TW/marketAuth.jsonnew file mode 100644index 00000000000..731fb108660--- /dev/null+++ b/locales/zh-TW/marketAuth.json@@ -0,0 +1,42 @@+{+ "callback": {+ "buttons": {+ "close": "關閉視窗"+ },+ "messages": {+ "authFailed": "授權失敗:{{error}}",+ "missingParams": "授權參數缺失",+ "processing": "正在處理授權中⋯⋯",+ "successWithCountdown": "{{message}} 視窗將於 {{countdown}} 秒後自動關閉",+ "successWithRedirect": "授權成功!正在重新導向⋯⋯"+ },+ "titles": {+ "error": "授權失敗",+ "loading": "LobeHub Market 授權中",+ "success": "授權成功"+ }+ },+ "errors": {+ "authorizationFailed": "授權失敗,請重試。",+ "browserOnly": "授權流程僅能在瀏覽器中啟動。",+ "codeConsumed": "授權碼已被使用,請重新嘗試。",+ "codeVerifierMissing": "授權會話無效,請重新啟動登入流程。",+ "general": "授權發生錯誤,請重試。",+ "handoffFailed": "無法取得授權結果,請重試。",+ "handoffTimeout": "授權逾時,請在瀏覽器中完成操作後重試。",+ "oidcNotReady": "授權服務尚未準備就緒,請稍後再試。",+ "openBrowserFailed": "無法開啟系統瀏覽器,請重試。",+ "openPopupFailed": "無法開啟授權彈出視窗,請檢查瀏覽器的彈出視窗封鎖設定。",+ "popupClosed": "授權視窗尚未完成即被關閉。",+ "sessionExpired": "授權會話已過期,請重新登入。",+ "stateMismatch": "授權狀態不符,請重試。",+ "stateMissing": "找不到授權狀態,請重試。"+ },+ "messages": {+ "loading": "正在啟動授權流程⋯⋯",+ "success": {+ "submit": "授權成功!現在可以發佈助手了。",+ "upload": "授權成功!現在可以發佈新版本了。"+ }+ }+}diff --git a/locales/zh-TW/setting.json b/locales/zh-TW/setting.jsonindex 1a767686cfc..3f3d094d4c4 100644--- a/locales/zh-TW/setting.json+++ b/locales/zh-TW/setting.json@@ -2,6 +2,45 @@"about": {"title": "關於"},+ "agentInfoDescription": {+ "basic": {+ "avatar": "頭像",+ "description": "描述",+ "name": "名稱",+ "tags": "標籤",+ "title": "助手資訊"+ },+ "chat": {+ "displayMode": "顯示模式",+ "enableHistoryCount": "啟用歷史訊息計數",+ "historyCount": "歷史訊息數量",+ "no": "否",+ "searchMode": "搜尋模式",+ "title": "聊天偏好",+ "yes": "是"+ },+ "model": {+ "maxTokens": "最大 Token 數",+ "model": "模型",+ "provider": "服務提供者",+ "temperature": "溫度",+ "title": "模型設定",+ "topP": "Top P 值"+ },+ "plugins": {+ "count": "外掛設定({{count}})",+ "empty": "尚未安裝外掛",+ "title": "已安裝外掛"+ },+ "role": {+ "systemRole": "系統提示詞",+ "title": "角色設定"+ },+ "value": {+ "unset": "未設定",+ "untitled": "未命名助手"+ }+ },"agentTab": {"chat": "聊天偏好","meta": "助手資訊",@@ -18,6 +57,8 @@},"title": "數據統計"},+ "checking": "檢查中...",+ "checkingPermissions": "檢查權限中...","danger": {"clear": {"action": "立即清除",@@ -146,6 +187,58 @@},"waitingForMore": "更多模型正在 <1>計劃接入</1> 中,敬請期待"},+ "marketPublish": {+ "modal": {+ "changelog": {+ "extra": "描述此版本的主要變更與改進",+ "label": "變更日誌",+ "maxLengthError": "變更日誌不能超過 500 個字元",+ "placeholder": "請輸入變更日誌",+ "required": "請輸入變更日誌"+ },+ "comparison": {+ "local": "本地目前版本",+ "remote": "目前已發布版本"+ },+ "identifier": {+ "extra": "識別碼將作為助手的唯一標識,建議使用小寫字母、數字與連字號",+ "label": "助手識別碼",+ "lengthError": "識別碼長度應在 3-50 個字元之間",+ "patternError": "識別碼只能包含小寫字母、數字與連字號",+ "placeholder": "請輸入助手的唯一識別碼,例如:web-development",+ "required": "請輸入助手識別碼"+ },+ "loading": {+ "fetchingRemote": "正在載入遠端資料...",+ "submit": "正在發布助手...",+ "upload": "正在發布新版本..."+ },+ "messages": {+ "createVersionFailed": "版本建立失敗:{{message}}",+ "fetchRemoteFailed": "取得遠端助手資料失敗",+ "missingIdentifier": "目前助手尚未設定市場識別碼",+ "notAuthenticated": "請先登入市場帳號",+ "publishFailed": "發布失敗:{{message}}"+ },+ "submitButton": "發布",+ "title": {+ "submit": "分享到助手市集",+ "upload": "發布新版本"+ }+ },+ "resultModal": {+ "message": "助手已提交審核,審核通過後將自動上線。點擊「在市集查看」以查看已發布的助手。",+ "view": "在市集查看"+ },+ "submit": {+ "button": "分享到市集",+ "tooltip": "分享助手到市集"+ },+ "upload": {+ "button": "發布新版本",+ "tooltip": "發布新版本到助手市集"+ }+ },"message": {"success": "更新成功"},@@ -561,7 +654,7 @@},"submitAgentModal": {"button": "提交助手",- "identifier": "助手標識符",+ "identifier": "助手識別碼(identifier)","metaMiss": "請補全助手信息後提交,需要包含名稱、描述和標籤","placeholder": "請輸入助手的標識符,需要是唯一的,比如 web-development","tooltips": "分享到助手市場"diff --git a/package.json b/package.jsonindex 34d4ab2a226..edb592b0200 100644--- a/package.json+++ b/package.json@@ -166,9 +166,9 @@"@lobehub/charts": "^2.1.2","@lobehub/chat-plugin-sdk": "^1.32.4","@lobehub/chat-plugins-gateway": "^1.9.0",- "@lobehub/editor": "^1.21.2",- "@lobehub/icons": "^2.43.1",- "@lobehub/market-sdk": "^0.22.7",+ "@lobehub/market-sdk": "beta",+ "@lobehub/editor": "^1.20.2",+ "@lobehub/icons": "^2.42.0","@lobehub/tts": "^2.0.1","@lobehub/ui": "^2.13.5","@modelcontextprotocol/sdk": "^1.20.2",@@ -399,4 +399,4 @@"@vercel/speed-insights"]}-}+}\ No newline at end of filediff --git a/packages/const/src/url.ts b/packages/const/src/url.tsindex b22c981ee1c..8a0ab5531eb 100644--- a/packages/const/src/url.ts+++ b/packages/const/src/url.ts@@ -45,6 +45,7 @@ export const MORE_FILE_PREVIEW_REQUEST_URL =export const AGENTS_INDEX_GITHUB = 'https://github.com/lobehub/lobe-chat-agents';export const AGENTS_INDEX_GITHUB_ISSUE = urlJoin(AGENTS_INDEX_GITHUB, 'issues/new');+export const AGENTS_OFFICIAL_URL = 'https://lobehub.com/agent';export const SESSION_CHAT_URL = (id: string = INBOX_SESSION_ID, mobile?: boolean) =>qs.stringifyUrl({diff --git a/packages/database/migrations/meta/0039_snapshot.json b/packages/database/migrations/meta/0039_snapshot.jsonindex 5be9a79aa81..2b87ce3a8c2 100644--- a/packages/database/migrations/meta/0039_snapshot.json+++ b/packages/database/migrations/meta/0039_snapshot.json@@ -7583,4 +7583,4 @@},"version": "7","views": {}-}+}\ No newline at end of filediff --git a/packages/database/migrations/meta/_journal.json b/packages/database/migrations/meta/_journal.jsonindex 2ec4761ffb4..d5579caa722 100644--- a/packages/database/migrations/meta/_journal.json+++ b/packages/database/migrations/meta/_journal.json@@ -318,4 +318,4 @@}],"version": "6"-}+}\ No newline at end of filediff --git a/packages/database/src/core/migrations.json b/packages/database/src/core/migrations.jsonindex 10ecda86234..8e3ce7026e1 100644--- a/packages/database/src/core/migrations.json+++ b/packages/database/src/core/migrations.json@@ -769,4 +769,4 @@"folderMillis": 1762870034882,"hash": "733ec98c752c012f41c9cf57223a6869ba5a5f95b3b2856bb54fbb40a90a46d1"}-]+]\ No newline at end of filediff --git a/packages/database/src/models/session.ts b/packages/database/src/models/session.tsindex 34efd4b8620..f9313421b3c 100644--- a/packages/database/src/models/session.ts+++ b/packages/database/src/models/session.ts@@ -256,6 +256,31 @@ export class SessionModel {if (existResult) return existResult;}+ // Extract and properly map fields for agent creation from DiscoverAssistantDetail+ const {+ // MetaData fields (from discover assistant)+ title,+ description,+ tags = [],+ avatar,+ backgroundColor,+ // LobeAgentConfig fields+ model,+ params,+ systemRole,+ provider,+ plugins = [],+ openingMessage,+ openingQuestions = [],+ // TTS config+ tts,+ // Chat config+ chatConfig,+ // Field name mapping+ examples, // maps to fewShots+ identifier, // maps to marketIdentifier+ marketIdentifier,+ } = config as any;if (type === 'group') {const result = await trx.insert(sessions)@@ -276,9 +301,24 @@ export class SessionModel {const newAgents = await trx.insert(agents).values({- ...config,+ avatar,+ backgroundColor,+ chatConfig: chatConfig || {},createdAt: new Date(),+ description,+ fewShots: examples || null, // Map examples to fewShots fieldid: idGenerator('agents'),+ marketIdentifier: identifier || marketIdentifier,+ model: typeof model === 'string' ? model : null,+ openingMessage,+ openingQuestions,+ params: params || {},+ plugins,+ provider,+ systemRole,+ tags,+ title,+ tts: tts || {},updatedAt: new Date(),userId: this.userId,})@@ -595,6 +635,7 @@ export class SessionModel {avatar: agent?.avatar ?? avatar ?? undefined,backgroundColor: agent?.backgroundColor ?? backgroundColor ?? undefined,description: agent?.description ?? description ?? undefined,+ marketIdentifier: agent?.marketIdentifier ?? undefined,tags: agent?.tags ?? undefined,title: agent?.title ?? title ?? undefined,},diff --git a/packages/electron-client-ipc/src/events/index.ts b/packages/electron-client-ipc/src/events/index.tsindex b9788e7d219..9682fdd1474 100644--- a/packages/electron-client-ipc/src/events/index.ts+++ b/packages/electron-client-ipc/src/events/index.ts@@ -2,7 +2,11 @@ import { LocalSystemDispatchEvents } from './localSystem';import { MenuDispatchEvents } from './menu';import { NotificationDispatchEvents } from './notification';import { ProtocolBroadcastEvents, ProtocolDispatchEvents } from './protocol';-import { RemoteServerBroadcastEvents, RemoteServerDispatchEvents } from './remoteServer';+import {++ RemoteServerBroadcastEvents,+ RemoteServerDispatchEvents,+} from './remoteServer';import { DesktopSettingsDispatchEvents } from './settings';import { ShortcutDispatchEvents } from './shortcut';import { SystemBroadcastEvents, SystemDispatchEvents } from './system';@@ -51,4 +55,5 @@ export type MainBroadcastParams<T extends MainBroadcastEventKey> = Parameters<MainBroadcastEvents[T]>[0];+export type { MarketAuthorizationParams } from './remoteServer';export type { OpenSettingsWindowOptions } from './windows';diff --git a/packages/electron-client-ipc/src/events/remoteServer.ts b/packages/electron-client-ipc/src/events/remoteServer.tsindex 7ab92f4f187..fbdf8bf6e18 100644--- a/packages/electron-client-ipc/src/events/remoteServer.ts+++ b/packages/electron-client-ipc/src/events/remoteServer.ts@@ -1,6 +1,10 @@import { DataSyncConfig } from '../types/dataSync';import { ProxyTRPCRequestParams, ProxyTRPCRequestResult } from '../types/proxyTRPCRequest';+export interface MarketAuthorizationParams {+ authUrl: string;+}+/*** 远程服务器配置相关的事件*/@@ -21,6 +25,10 @@ export interface RemoteServerDispatchEvents {error?: string;success: boolean;};+ requestMarketAuthorization: (params: MarketAuthorizationParams) => {+ error?: string;+ success: boolean;+ };setRemoteServerConfig: (config: DataSyncConfig) => boolean;}diff --git a/packages/model-bank/src/aiModels/mistral.ts b/packages/model-bank/src/aiModels/mistral.tsindex f08eed6f8e8..1d88beca724 100644--- a/packages/model-bank/src/aiModels/mistral.ts+++ b/packages/model-bank/src/aiModels/mistral.ts@@ -45,7 +45,8 @@ const mistralChatModels: AIChatModelCard[] = [vision: true,},contextWindowTokens: 128_000,- description: 'Magistral Small 1.2 是Mistral AI于2025年9月发布的开源小型推理模型,具有视觉支持。',+ description:+ 'Magistral Small 1.2 是Mistral AI于2025年9月发布的开源小型推理模型,具有视觉支持。',displayName: 'Magistral Small 1.2',id: 'magistral-small-2509',pricing: {diff --git a/packages/types/src/discover/assistants.ts b/packages/types/src/discover/assistants.tsindex 4b259d874b9..46fda44cc71 100644--- a/packages/types/src/discover/assistants.ts+++ b/packages/types/src/discover/assistants.ts@@ -24,6 +24,7 @@ export enum AssistantSorts {CreatedAt = 'createdAt',Identifier = 'identifier',KnowledgeCount = 'knowledgeCount',+ MyOwn = 'myown',PluginCount = 'pluginCount',Title = 'title',TokenUsage = 'tokenUsage',@@ -34,6 +35,7 @@ export enum AssistantNavKey {Overview = 'overview',Related = 'related',SystemRole = 'systemRole',+ Version = 'version'}export interface DiscoverAssistantItem extends Omit<LobeAgentSettings, 'meta'>, MetaData {@@ -47,14 +49,18 @@ export interface DiscoverAssistantItem extends Omit<LobeAgentSettings, 'meta'>,tokenUsage: number;}+export type AssistantMarketSource = 'legacy' | 'new';+export interface AssistantQueryParams {category?: string;locale?: string;order?: 'asc' | 'desc';+ ownerId?: string;page?: number;pageSize?: number;q?: string;sort?: AssistantSorts;+ source?: AssistantMarketSource;}export interface AssistantListResponse {@@ -66,7 +72,17 @@ export interface AssistantListResponse {}export interface DiscoverAssistantDetail extends DiscoverAssistantItem {+ currentVersion?: string;examples?: FewShots;related: DiscoverAssistantItem[];summary?: string;+ versions?: DiscoverAssistantVersion[];+}++export interface DiscoverAssistantVersion {+ createdAt?: string;+ isLatest?: boolean;+ isValidated?: boolean;+ status?: 'published' | 'unpublished' | 'archived' | 'deprecated';+ version: string;}diff --git a/packages/types/src/meta.ts b/packages/types/src/meta.tsindex 23ce2b941c2..09c12b54d1a 100644--- a/packages/types/src/meta.ts+++ b/packages/types/src/meta.ts@@ -10,6 +10,10 @@ export const LobeMetaDataSchema = z.object({*/backgroundColor: z.string().optional(),description: z.string().optional(),+ /**+ * Market agent identifier for published agents+ */+ marketIdentifier: z.string().optional(),tags: z.array(z.string()).optional(),/**diff --git a/packages/types/src/session/agentSession.ts b/packages/types/src/session/agentSession.tsindex 184bfd220ae..7b4d553022f 100644--- a/packages/types/src/session/agentSession.ts+++ b/packages/types/src/session/agentSession.ts@@ -20,6 +20,8 @@ export interface LobeAgentSession {createdAt: Date;group?: string;id: string;+ /** Market agent identifier for published agents */+ marketIdentifier?: string;meta: MetaData;model: string;pinned?: boolean;diff --git a/src/app/(backend)/market/agent/[[...segments]]/route.ts b/src/app/(backend)/market/agent/[[...segments]]/route.tsnew file mode 100644index 00000000000..48d4a7f86e1--- /dev/null+++ b/src/app/(backend)/market/agent/[[...segments]]/route.ts@@ -0,0 +1,153 @@+import { MarketSDK } from '@lobehub/market-sdk';+import { NextRequest, NextResponse } from 'next/server';++type RouteContext = {+ params: Promise<{+ segments?: string[];+ }>;+};++const MARKET_BASE_URL = process.env.NEXT_PUBLIC_MARKET_BASE_URL || 'http://127.0.0.1:8787';++const extractAccessToken = (req: NextRequest) => {+ const authorization = req.headers.get('authorization');+ if (!authorization) return undefined;++ const [scheme, token] = authorization.split(' ');+ if (scheme?.toLowerCase() !== 'bearer' || !token) return undefined;++ return token;+};++const methodNotAllowed = (methods: string[]) =>+ NextResponse.json(+ {+ error: 'method_not_allowed',+ message: `Allowed methods: ${methods.join(', ')}`,+ status: 'error',+ },+ {+ headers: { Allow: methods.join(', ') },+ status: 405,+ },+ );++const badRequest = (error: string, message: string) =>+ NextResponse.json(+ {+ error,+ message,+ status: 'error',+ },+ { status: 400 },+ );++const notFound = (reason: string) =>+ NextResponse.json(+ {+ error: 'not_found',+ message: reason,+ status: 'error',+ },+ { status: 404 },+ );++const handleAgent = async (req: NextRequest, segments: string[]) => {+ const accessToken = extractAccessToken(req);+ const market = new MarketSDK({+ accessToken,+ baseURL: MARKET_BASE_URL,+ });++ if (segments.length === 0) {+ return notFound('Missing agent action.');+ }++ const [action, ...rest] = segments;++ if (action === 'create') {+ if (req.method !== 'POST') return methodNotAllowed(['POST']);++ try {+ const payload = await req.json();+ const response = await market.agents.createAgent(payload);+ return NextResponse.json(response);+ } catch (error) {+ console.error('[Market] Failed to create agent:', error);+ return NextResponse.json(+ {+ error: 'create_agent_failed',+ message: error instanceof Error ? error.message : 'Unknown error',+ status: 'error',+ },+ { status: 500 },+ );+ }+ }++ if (action === 'versions') {+ if (rest.length !== 1 || rest[0] !== 'create') {+ return notFound('Requested agent version endpoint is not available.');+ }++ if (req.method !== 'POST') return methodNotAllowed(['POST']);++ try {+ const payload = await req.json();+ if (typeof payload !== 'object' || payload === null) {+ return badRequest('invalid_payload', 'Request body must be a JSON object.');+ }++ const identifier = (payload as { identifier?: string }).identifier;+ if (!identifier) {+ return badRequest('missing_identifier', 'Identifier is required to create agent version.');+ }++ const response = await market.agents.createAgentVersion(payload);+ return NextResponse.json(response);+ } catch (error) {+ console.error('[Market] Failed to create agent version:', error);+ return NextResponse.json(+ {+ error: 'create_agent_version_failed',+ message: error instanceof Error ? error.message : 'Unknown error',+ status: 'error',+ },+ { status: 500 },+ );+ }+ }++ if (segments.length === 1) {+ if (req.method !== 'GET') return methodNotAllowed(['GET']);++ try {+ const response = await market.agents.getAgentDetail(action);+ return NextResponse.json(response);+ } catch (error) {+ console.error('[Market] Failed to get agent detail:', error);+ return NextResponse.json(+ {+ error: 'get_agent_detail_failed',+ message: error instanceof Error ? error.message : 'Unknown error',+ status: 'error',+ },+ { status: 500 },+ );+ }+ }++ return notFound('Requested agent endpoint is not available.');+};++const handleProxy = async (req: NextRequest, context: RouteContext) => {+ const { segments } = await context.params;+ const normalizedSegments = segments?.map((segment) => decodeURIComponent(segment)) ?? [];++ return handleAgent(req, normalizedSegments);+};++export const GET = (req: NextRequest, context: RouteContext) => handleProxy(req, context);+export const POST = (req: NextRequest, context: RouteContext) => handleProxy(req, context);++export const dynamic = 'force-dynamic';diff --git a/src/app/(backend)/market/oidc/[[...segments]]/route.ts b/src/app/(backend)/market/oidc/[[...segments]]/route.tsnew file mode 100644index 00000000000..4174d25371c--- /dev/null+++ b/src/app/(backend)/market/oidc/[[...segments]]/route.ts@@ -0,0 +1,207 @@+import { MarketSDK } from '@lobehub/market-sdk';+import { NextRequest, NextResponse } from 'next/server';++type RouteContext = {+ params: Promise<{+ segments?: string[];+ }>;+};++const MARKET_BASE_URL = process.env.NEXT_PUBLIC_MARKET_BASE_URL || 'http://127.0.0.1:8787';+const ALLOWED_ENDPOINTS = new Set(['handoff', 'token', 'userinfo']);++const ensureEndpoint = (segments?: string[]) => {+ if (!segments || segments.length === 0) {+ return { error: 'missing_endpoint', status: 404 } as const;+ }++ if (segments.length !== 1) {+ return { error: 'unsupported_nested_path', status: 404 } as const;+ }++ const endpoint = segments[0];++ if (!ALLOWED_ENDPOINTS.has(endpoint)) {+ return { error: 'unknown_endpoint', status: 404 } as const;+ }++ return { endpoint } as const;+};++const methodNotAllowed = (allowed: string[]) =>+ NextResponse.json(+ {+ error: 'method_not_allowed',+ message: `Allowed methods: ${allowed.join(', ')}`,+ status: 'error',+ },+ {+ headers: { Allow: allowed.join(', ') },+ status: 405,+ },+ );++const handleProxy = async (req: NextRequest, context: RouteContext) => {+ const market = new MarketSDK({+ baseURL: MARKET_BASE_URL,+ });++ const { segments } = await context.params;+ const endpointResult = ensureEndpoint(segments);++ if ('error' in endpointResult) {+ return NextResponse.json(+ {+ error: endpointResult.error,+ message: 'Requested endpoint is not available.',+ status: 'error',+ },+ { status: endpointResult.status },+ );+ }++ const endpoint = endpointResult.endpoint;++ switch (endpoint) {+ case 'handoff': {+ try {+ const id = req.nextUrl.searchParams.get('id');+ if (id) {+ const handoff = await market.auth.getOAuthHandoff(id);+ return new NextResponse(JSON.stringify(handoff), { status: 200 });+ } else {+ return NextResponse.json(+ {+ error: 'missing_id',+ message: 'ID is required for handoff proxy.',+ status: 'error',+ },+ { status: 400 },+ );+ }+ } catch (error) {+ return NextResponse.json(+ {+ error: 'handoff_proxy_failed',+ message: error instanceof Error ? error.message : 'Unknown error',+ status: 'error',+ },+ { status: 500 },+ );+ }+ }++ case 'token': {+ if (req.method !== 'POST') {+ return methodNotAllowed(['POST']);+ }++ try {+ const body = await req.text();+ const form = new URLSearchParams(body);++ const grantType = (form.get('grant_type') || 'authorization_code') as+ | 'authorization_code'+ | 'refresh_token';++ if (grantType === 'authorization_code') {+ const clientId = form.get('client_id');+ const code = form.get('code');+ const codeVerifier = form.get('code_verifier');+ const redirectUri = form.get('redirect_uri');++ const response = await market.auth.exchangeOAuthToken({+ clientId: clientId as string,+ code: code as string,+ codeVerifier: codeVerifier as string,+ grantType: 'authorization_code',+ redirectUri: redirectUri as string,+ });++ return NextResponse.json(response);+ }++ if (grantType === 'refresh_token') {+ const refreshToken = form.get('refresh_token');+ const clientId = form.get('client_id');++ const response = await market.auth.exchangeOAuthToken({+ clientId: clientId ?? undefined,+ grantType: 'refresh_token',+ refreshToken: refreshToken as string,+ });++ return NextResponse.json(response);+ }++ return NextResponse.json(+ {+ error: 'unsupported_grant_type',+ message: `Unsupported grant_type: ${grantType}`,+ status: 'error',+ },+ { status: 400 },+ );+ } catch (error) {+ console.error('[MarketOIDC] Failed to proxy token request:', error);+ return NextResponse.json(+ {+ error: 'token_proxy_failed',+ message: error instanceof Error ? error.message : 'Unknown error',+ status: 'error',+ },+ { status: 500 },+ );+ }+ }++ case 'userinfo': {+ if (req.method !== 'POST') {+ return methodNotAllowed(['POST']);+ }++ try {+ const { token } = (await req.json()) as { token?: string };+ if (!token) {+ return NextResponse.json(+ {+ error: 'missing_token',+ message: 'Token is required for userinfo proxy.',+ status: 'error',+ },+ { status: 400 },+ );+ }++ const response = await market.auth.getUserInfo(token);+ return NextResponse.json(response);+ } catch (error) {+ console.error('[MarketOIDC] Failed to proxy userinfo request:', error);+ return NextResponse.json(+ {+ error: 'userinfo_proxy_failed',+ message: error instanceof Error ? error.message : 'Unknown error',+ status: 'error',+ },+ { status: 500 },+ );+ }+ }++ default: {+ return NextResponse.json(+ {+ error: 'unsupported_endpoint',+ message: 'Requested endpoint is not supported.',+ status: 'error',+ },+ { status: 404 },+ );+ }+ }+};++export const GET = (req: NextRequest, context: RouteContext) => handleProxy(req, context);+export const POST = (req: NextRequest, context: RouteContext) => handleProxy(req, context);++export const dynamic = 'force-dynamic';diff --git a/src/app/[variants]/(main)/(mobile)/me/settings/features/useCategory.tsx b/src/app/[variants]/(main)/(mobile)/me/settings/features/useCategory.tsxindex 1734eaffb33..0f2e705e6b8 100644--- a/src/app/[variants]/(main)/(mobile)/me/settings/features/useCategory.tsx+++ b/src/app/[variants]/(main)/(mobile)/me/settings/features/useCategory.tsx@@ -1,6 +1,7 @@import { Bot, Brain, Info, Mic2, Settings2, Sparkles } from 'lucide-react';import { useRouter } from 'next/navigation';import { useTranslation } from 'react-i18next';+import { CellProps } from '@/components/Cell';import { isDeprecatedEdition } from '@/const/version';import { SettingsTabs } from '@/store/global/initialState';diff --git a/src/app/[variants]/(main)/_layout/Desktop/SideBar/PinList/index.tsx b/src/app/[variants]/(main)/_layout/Desktop/SideBar/PinList/index.tsxindex d0770a58cd6..b73bc02a2e8 100644--- a/src/app/[variants]/(main)/_layout/Desktop/SideBar/PinList/index.tsx+++ b/src/app/[variants]/(main)/_layout/Desktop/SideBar/PinList/index.tsx@@ -82,12 +82,14 @@ const PinList = () => {hasList && (<><Divider style={{ marginBottom: 8, marginTop: 4 }} />- <ScrollShadow height={"100%"} hideScrollBar={true} size={40}>+ <ScrollShadow height={'100%'} hideScrollBar={true} size={40}><Flexbox gap={12} style={{ padding: '0' }}>{list.map((item, index) => (<Flexbox key={item.id} style={{ position: 'relative' }}><Tooltip- hotkey={index < 9 ? hotkey.replaceAll(KeyEnum.Number, String(index + 1)) : undefined}+ hotkey={+ index < 9 ? hotkey.replaceAll(KeyEnum.Number, String(index + 1)) : undefined+ }placement={'right'}title={sessionHelpers.getTitle(item.meta)}>diff --git a/src/app/[variants]/(main)/chat/settings/features/AgentInfoDescription/index.tsx b/src/app/[variants]/(main)/chat/settings/features/AgentInfoDescription/index.tsxnew file mode 100644index 00000000000..30972f62a29--- /dev/null+++ b/src/app/[variants]/(main)/chat/settings/features/AgentInfoDescription/index.tsx@@ -0,0 +1,349 @@+'use client';++import { ProDescriptions } from '@ant-design/pro-components';+import { AgentItemDetail } from '@lobehub/market-sdk';+import { Tag } from 'antd';+import Image from 'next/image';+import { memo } from 'react';+import { useTranslation } from 'react-i18next';+import { Flexbox } from 'react-layout-kit';++import Tokens from '@/features/AgentSetting/AgentPrompt/TokenTag';++interface AgentConfig {+ params?: {+ max_tokens?: number;+ temperature?: number;+ top_p?: number;+ };+}++interface ChatConfig {+ displayMode?: string;+ enableHistoryCount?: boolean;+ historyCount?: number;+ searchMode?: string;+}++interface TTSConfig {+ ttsService?: string;+ voice?: any;+}++interface AgentInfoDescriptionProps {+ agentConfig?: AgentConfig;+ chatConfig?: ChatConfig;+ files?: Array<{+ enabled?: boolean;+ id: string;+ name: string;+ type: string;+ }>;+ isRemote?: boolean;+ knowledgeBases?: Array<{+ enabled?: boolean;+ id: string;+ name: string;+ }>;+ meta?: Partial<AgentItemDetail> & {+ description?: string;+ name?: string;+ title?: string;+ };+ model?: string;+ plugins?: string[];+ provider?: string;+ systemRole?: string;+ ttsConfig?: TTSConfig;+}++const AgentInfoDescription = memo<AgentInfoDescriptionProps>(+ ({+ agentConfig,+ chatConfig,+ files = [],+ isRemote = false,+ knowledgeBases = [],+ meta,+ model,+ plugins = [],+ provider,+ systemRole,+ ttsConfig,+ }) => {+ const { t } = useTranslation('setting');+ // 转换远程数据格式+ const getProcessedData = () => {+ if (!isRemote || !meta) {+ return {+ agentConfig,+ chatConfig,+ files,+ knowledgeBases,+ meta,+ model,+ plugins,+ provider,+ systemRole,+ ttsConfig,+ };+ }++ // 远程数据格式转换+ const remoteData = meta;+ const config = remoteData.config || {};++ return {+ agentConfig: {+ params: config.model?.parameters || {},+ },+ chatConfig: config.chatConfig || {},+ files: config.files || [],+ knowledgeBases: config.knowledgeBases || [],+ meta: {+ avatar: remoteData?.avatar,+ description: remoteData?.description,+ name: remoteData?.versionName,+ tags: remoteData?.tags ? [remoteData.tags] : undefined,+ title: remoteData?.name,+ },+ model: config.model?.model,+ plugins: config.plugins?.map((p: any) => (typeof p === 'string' ? p : p.identifier)) || [],+ provider: config.model?.provider,+ systemRole: config.systemRole,+ ttsConfig: config.tts || {},+ };+ };++ const {+ agentConfig: processedAgentConfig,+ chatConfig: processedChatConfig,+ meta: processedMeta,+ model: processedModel,+ plugins: processedPlugins,+ provider: processedProvider,+ systemRole: processedSystemRole,+ } = getProcessedData();+ const unsetText = t('agentInfoDescription.value.unset');+ const unnamedText = t('agentInfoDescription.value.untitled');+ const pluginEmptyText = t('agentInfoDescription.plugins.empty');+ const renderAvatar = (avatar: string | undefined) => {+ if (!avatar || avatar === '未设置') return unsetText;++ // 如果是 http 或 https 链接,显示图片+ if (avatar.startsWith('http://') || avatar.startsWith('https://')) {+ return (+ <Image alt="avatar" height={40} src={avatar} style={{ borderRadius: '50%' }} width={40} />+ );+ }++ // 否则直接显示字符(emoji)+ return (+ <div+ style={{+ fontSize: '24px',+ height: 40,+ lineHeight: '40px',+ textAlign: 'center',+ width: 40,+ }}+ >+ {avatar}+ </div>+ );+ };++ return (+ <div style={{ height: '500px', overflow: 'auto' }}>+ <Flexbox gap={16}>+ {/* 基础信息 */}+ <ProDescriptions+ bordered+ column={2}+ columns={[+ {+ dataIndex: 'title',+ key: 'title',+ title: t('agentInfoDescription.basic.name'),+ },+ {+ dataIndex: 'avatar',+ key: 'avatar',+ render: (_: any, record: any) => renderAvatar(record.avatar),+ title: t('agentInfoDescription.basic.avatar'),+ },+ {+ dataIndex: 'description',+ key: 'description',+ span: 2,+ title: t('agentInfoDescription.basic.description'),+ },+ {+ dataIndex: 'tags',+ key: 'tags',+ render: (_: any, record: any) => {+ const tags = record.tags;+ if (!tags || !tags.length) return unsetText;+ return tags.map((tag: string, index: number) => (+ <Tag color="blue" key={index}>+ {tag}+ </Tag>+ ));+ },+ span: 2,+ title: t('agentInfoDescription.basic.tags'),+ },+ ]}+ dataSource={{+ avatar: processedMeta?.avatar || unsetText,+ description: processedMeta?.description || unsetText,+ tags: processedMeta?.tags?.length ? processedMeta.tags : undefined,+ title: processedMeta?.title || processedMeta?.name || unnamedText,+ }}+ size="small"+ title={t('agentInfoDescription.basic.title')}+ />++ {/* 角色设定 */}+ <ProDescriptions+ bordered+ column={1}+ columns={[+ {+ dataIndex: 'systemRole',+ key: 'systemRole',+ render: (_: any, record: any) => {+ const text = record.systemRole;+ if (text === unsetText) return text;+ return text;+ },+ title: t('agentInfoDescription.role.systemRole'),+ },+ ]}+ dataSource={{+ systemRole: processedSystemRole || unsetText,+ }}+ size="small"+ title={+ <Flexbox align={'center'} gap={8} horizontal>+ <span>{t('agentInfoDescription.role.title')}</span>+ <Tokens style={{ marginTop: 0 }} value={processedSystemRole || ''} />+ </Flexbox>+ }+ />++ {/* 模型设置 */}+ <ProDescriptions+ bordered+ column={2}+ columns={[+ {+ dataIndex: 'model',+ key: 'model',+ title: t('agentInfoDescription.model.model'),+ },+ {+ dataIndex: 'provider',+ key: 'provider',+ title: t('agentInfoDescription.model.provider'),+ },+ {+ dataIndex: 'temperature',+ key: 'temperature',+ title: t('agentInfoDescription.model.temperature'),+ },+ {+ dataIndex: 'topP',+ key: 'topP',+ title: 'Top P',+ },+ {+ dataIndex: 'maxTokens',+ key: 'maxTokens',+ span: 2,+ title: t('agentInfoDescription.model.maxTokens'),+ },+ ]}+ dataSource={{+ maxTokens: processedAgentConfig?.params?.max_tokens ?? unsetText,+ model: processedModel || unsetText,+ provider: processedProvider || unsetText,+ temperature: processedAgentConfig?.params?.temperature ?? unsetText,+ topP: processedAgentConfig?.params?.top_p ?? unsetText,+ }}+ size="small"+ title={t('agentInfoDescription.model.title')}+ />++ {/* 聊天偏好 */}+ <ProDescriptions+ bordered+ column={2}+ columns={[+ {+ dataIndex: 'historyCount',+ key: 'historyCount',+ title: t('agentInfoDescription.chat.historyCount'),+ },+ {+ dataIndex: 'enableHistoryCount',+ key: 'enableHistoryCount',+ title: t('agentInfoDescription.chat.enableHistoryCount'),+ },+ {+ dataIndex: 'displayMode',+ key: 'displayMode',+ title: t('agentInfoDescription.chat.displayMode'),+ },+ {+ dataIndex: 'searchMode',+ key: 'searchMode',+ title: t('agentInfoDescription.chat.searchMode'),+ },+ ]}+ dataSource={{+ displayMode: processedChatConfig?.displayMode || unsetText,+ enableHistoryCount: processedChatConfig?.enableHistoryCount+ ? t('agentInfoDescription.chat.yes')+ : t('agentInfoDescription.chat.no'),+ historyCount: processedChatConfig?.historyCount ?? unsetText,+ searchMode: processedChatConfig?.searchMode || unsetText,+ }}+ size="small"+ title={t('agentInfoDescription.chat.title')}+ />++ <ProDescriptions+ bordered+ column={1}+ columns={[+ {+ dataIndex: 'plugins',+ key: 'plugins',+ render: (_: any, record: any) => {+ const pluginList = record.plugins;+ if (!pluginList?.length) return pluginEmptyText;+ return pluginList.map((plugin: string, index: number) => (+ <Tag color="green" key={index}>+ {plugin}+ </Tag>+ ));+ },+ title: t('agentInfoDescription.plugins.title'),+ },+ ]}+ dataSource={{+ plugins: processedPlugins?.length ? processedPlugins : [],+ }}+ size="small"+ title={t('agentInfoDescription.plugins.count', {+ count: processedPlugins?.length || 0,+ })}+ />+ </Flexbox>+ </div>+ );+ },+);++export default AgentInfoDescription;diff --git a/src/app/[variants]/(main)/chat/settings/features/HeaderContent.tsx b/src/app/[variants]/(main)/chat/settings/features/HeaderContent.tsxindex 5cc40e9be39..30374c8ac92 100644--- a/src/app/[variants]/(main)/chat/settings/features/HeaderContent.tsx+++ b/src/app/[variants]/(main)/chat/settings/features/HeaderContent.tsx@@ -1,9 +1,9 @@import { memo } from 'react';-import SubmitAgentButton from './SubmitAgentButton';+import SmartAgentActionButton from './SmartAgentActionButton';export const HeaderContent = memo<{ mobile?: boolean; modal?: boolean }>(({ modal }) => {- return <SubmitAgentButton modal={modal} />;+ return <SmartAgentActionButton modal={modal} />;});export default HeaderContent;diff --git a/src/app/[variants]/(main)/chat/settings/features/PublishResultModal/index.tsx b/src/app/[variants]/(main)/chat/settings/features/PublishResultModal/index.tsxnew file mode 100644index 00000000000..63d61da3229--- /dev/null+++ b/src/app/[variants]/(main)/chat/settings/features/PublishResultModal/index.tsx@@ -0,0 +1,64 @@+'use client';++import { CheckCircleOutlined } from '@ant-design/icons';+import { Button, Modal, Space } from 'antd';+import { useRouter } from 'next/navigation';+import { memo } from 'react';+import { useTranslation } from 'react-i18next';++interface PublishResultModalProps {+ identifier?: string;+ onCancel: () => void;+ open: boolean;+}++const PublishResultModal = memo<PublishResultModalProps>(({ identifier, onCancel, open }) => {+ const router = useRouter();+ const { t } = useTranslation('setting');+ const { t: tCommon } = useTranslation('common');++ const handleGoToMarket = () => {+ if (identifier) {+ router.push(`/discover/assistant/${identifier}`);+ }+ onCancel();+ };++ const successContent = (+ <div style={{ padding: '20px 0', textAlign: 'center' }}>+ <CheckCircleOutlined+ style={{+ color: '#52c41a',+ display: 'block',+ fontSize: '48px',+ marginBottom: '16px',+ }}+ />+ <div style={{ fontSize: '16px', marginBottom: '24px' }}>+ {t('marketPublish.resultModal.message')}+ </div>+ <Space>+ <Button onClick={onCancel}>{tCommon('cancel')}</Button>+ <Button onClick={handleGoToMarket} type="primary">+ {t('marketPublish.resultModal.view')}+ </Button>+ </Space>+ </div>+ );++ return (+ <Modal+ centered+ closable={false}+ footer={null}+ onCancel={onCancel}+ open={open}+ title={null}+ width={480}+ >+ {successContent}+ </Modal>+ );+});++export default PublishResultModal;diff --git a/src/app/[variants]/(main)/chat/settings/features/SmartAgentActionButton/MarketPublishButton.tsx b/src/app/[variants]/(main)/chat/settings/features/SmartAgentActionButton/MarketPublishButton.tsxnew file mode 100644index 00000000000..22c03646b9d--- /dev/null+++ b/src/app/[variants]/(main)/chat/settings/features/SmartAgentActionButton/MarketPublishButton.tsx@@ -0,0 +1,196 @@+import { ActionIcon, Button } from '@lobehub/ui';+import { message } from 'antd';+import { LogIn, Share2, Upload } from 'lucide-react';+import { memo, useCallback, useMemo, useState } from 'react';+import { useTranslation } from 'react-i18next';++import { HEADER_ICON_SIZE } from '@/const/layoutTokens';+import { checkOwnership } from '@/hooks/useAgentOwnershipCheck';+import { useMarketAuth } from '@/layout/AuthProvider/MarketAuth';+import { resolveMarketAuthError } from '@/layout/AuthProvider/MarketAuth/errors';+import { useServerConfigStore } from '@/store/serverConfig';++import MarketPublishModal, { type MarketPublishAction } from './MarketPublishModal';++interface MarketPublishButtonProps {+ action: MarketPublishAction;+ marketIdentifier?: string;+ modal?: boolean;+}++const MarketPublishButton = memo<MarketPublishButtonProps>(+ ({ action, marketIdentifier, modal }) => {+ const { t: tSetting } = useTranslation('setting');+ const { t: tMarketAuth } = useTranslation('marketAuth');+ const mobile = useServerConfigStore((s) => s.isMobile);+ const [openState, setOpenState] = useState<{ submit: boolean; upload: boolean }>({+ submit: false,+ upload: false,+ });+ const { isAuthenticated, isLoading, session, signIn } = useMarketAuth();++ const buttonCopy = useMemo(() => {+ if (action === 'upload') {+ return {+ authenticated: {+ icon: Upload,+ text: tSetting('marketPublish.upload.button'),+ title: tSetting('marketPublish.upload.tooltip'),+ },+ successMessage: tMarketAuth('messages.success.upload'),+ unauthenticated: {+ icon: LogIn,+ text: tSetting('marketPublish.upload.button'),+ title: tSetting('marketPublish.upload.tooltip'),+ },+ } as const;+ }++ const submitText = tSetting('submitAgentModal.tooltips');++ return {+ authenticated: {+ icon: Share2,+ text: submitText,+ title: submitText,+ },+ successMessage: tMarketAuth('messages.success.submit'),+ unauthenticated: {+ icon: LogIn,+ text: tSetting('marketPublish.submit.button'),+ title: tSetting('marketPublish.submit.tooltip'),+ },+ } as const;+ }, [action, tMarketAuth, tSetting]);++ const openModal = useCallback((target: MarketPublishAction) => {+ setOpenState((prev) => ({ ...prev, [target]: true }));+ }, []);++ const closeModal = useCallback((target: MarketPublishAction) => {+ setOpenState((prev) => ({ ...prev, [target]: false }));+ }, []);++ const handleButtonClick = useCallback(async () => {+ console.log(+ `[MarketPublishButton][${action}] Button clicked, isAuthenticated:`,+ isAuthenticated,+ );++ if (isAuthenticated) {+ console.log(`[MarketPublishButton][${action}] User is authenticated, opening modal`);+ openModal(action);+ return;+ }++ console.log(+ `[MarketPublishButton][${action}] User not authenticated, starting authorization`,+ );+ try {+ message.loading({ content: tMarketAuth('messages.loading'), key: 'market-auth' });+ const accountId = await signIn();+ message.success({ content: buttonCopy.successMessage, key: 'market-auth' });++ let targetAction: MarketPublishAction = action;++ if (marketIdentifier && accountId !== null) {+ let accessToken = session?.accessToken;++ if (!accessToken && typeof window !== 'undefined') {+ const storedSession = sessionStorage.getItem('market_auth_session');+ if (storedSession) {+ try {+ const parsed = JSON.parse(storedSession) as { accessToken?: string };+ accessToken = parsed.accessToken;+ } catch (parseError) {+ console.error('[MarketPublishButton] Failed to parse stored session:', parseError);+ }+ }+ }++ if (accessToken) {+ try {+ const isOwner = await checkOwnership({+ accessToken,+ accountId,+ marketIdentifier,+ skipCache: true,+ });++ targetAction = isOwner ? 'upload' : 'submit';+ } catch (ownershipError) {+ console.error('[MarketPublishButton] Failed to confirm ownership:', ownershipError);+ }+ }+ }++ openModal(targetAction);+ } catch (error) {+ console.error(`[MarketPublishButton][${action}] Authorization failed:`, error);+ const normalizedError = resolveMarketAuthError(error);+ message.error({+ content: tMarketAuth(`errors.${normalizedError.code}`),+ key: 'market-auth',+ });+ }+ }, [+ action,+ buttonCopy.successMessage,+ isAuthenticated,+ marketIdentifier,+ openModal,+ session?.accessToken,+ signIn,+ tMarketAuth,+ ]);++ const buttonProps = isAuthenticated ? buttonCopy.authenticated : buttonCopy.unauthenticated;++ return (+ <>+ {modal ? (+ <Button+ block+ disabled={isLoading}+ icon={buttonProps.icon}+ loading={isLoading}+ onClick={handleButtonClick}+ variant={'filled'}+ >+ {buttonProps.text}+ </Button>+ ) : (+ <ActionIcon+ icon={buttonProps.icon}+ loading={isLoading}+ onClick={handleButtonClick}+ size={HEADER_ICON_SIZE(mobile)}+ title={buttonProps.title}+ />+ )}++ {isAuthenticated && (+ <>+ <MarketPublishModal+ action="submit"+ onCancel={() => closeModal('submit')}+ onSuccess={() => closeModal('submit')}+ open={openState.submit}+ />++ <MarketPublishModal+ action="upload"+ onCancel={() => closeModal('upload')}+ onSuccess={() => closeModal('upload')}+ open={openState.upload}+ />+ </>+ )}+ </>+ );+ },+);++MarketPublishButton.displayName = 'MarketPublishButton';++export default MarketPublishButton;diff --git a/src/app/[variants]/(main)/chat/settings/features/SmartAgentActionButton/MarketPublishModal.tsx b/src/app/[variants]/(main)/chat/settings/features/SmartAgentActionButton/MarketPublishModal.tsxnew file mode 100644index 00000000000..9f9489b603e--- /dev/null+++ b/src/app/[variants]/(main)/chat/settings/features/SmartAgentActionButton/MarketPublishModal.tsx@@ -0,0 +1,358 @@+'use client';++import { ModalForm, ProFormText } from '@ant-design/pro-components';+import { AgentItemDetail } from '@lobehub/market-sdk';+import { type ModalProps } from '@lobehub/ui';+import { Col, Row, Spin } from 'antd';+import isEqual from 'fast-deep-equal';+import { memo, useCallback, useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';++import { message } from '@/components/AntdStaticMethods';+import { useTokenCount } from '@/hooks/useTokenCount';+import { useMarketAuth } from '@/layout/AuthProvider/MarketAuth';+import { marketApiService } from '@/services/marketApi';+import { useAgentStore } from '@/store/agent';+import { agentChatConfigSelectors, agentSelectors } from '@/store/agent/selectors';+import { useGlobalStore } from '@/store/global';+import { globalGeneralSelectors } from '@/store/global/selectors';+import { useSessionStore } from '@/store/session';+import { sessionMetaSelectors } from '@/store/session/selectors';++import AgentInfoDescription from '../AgentInfoDescription';+import PublishResultModal from '../PublishResultModal';++export type MarketPublishAction = 'submit' | 'upload';++interface MarketPublishModalProps extends ModalProps {+ action: MarketPublishAction;+ onSuccess?: () => void;+}++interface MarketPublishFormValues {+ changelog: string;+ identifier?: string;+}++const MarketPublishModal = memo<MarketPublishModalProps>(+ ({ action, open, onCancel, onSuccess }) => {+ const { t } = useTranslation('setting');+ const isSubmit = action === 'submit';+ const isUpload = action === 'upload';++ const { session: marketSession, isAuthenticated } = useMarketAuth();+ const meta = useSessionStore(sessionMetaSelectors.currentAgentMeta, isEqual);+ const updateSessionMeta = useSessionStore((s) => s.updateSessionMeta);++ const systemRole = useAgentStore(agentSelectors.currentAgentSystemRole);+ const language = useGlobalStore(globalGeneralSelectors.currentLanguage);+ const agentConfig = useAgentStore(agentSelectors.currentAgentConfig);+ const chatConfig = useAgentStore(agentChatConfigSelectors.currentChatConfig);+ const plugins = useAgentStore(agentSelectors.currentAgentPlugins);+ const ttsConfig = useAgentStore(agentSelectors.currentAgentTTS);+ const model = useAgentStore(agentSelectors.currentAgentModel);+ const provider = useAgentStore(agentSelectors.currentAgentModelProvider);+ const knowledgeBases = useAgentStore(agentSelectors.currentAgentKnowledgeBases);+ const files = useAgentStore(agentSelectors.currentAgentFiles);++ const [remoteAgentData, setRemoteAgentData] = useState<+ (AgentItemDetail & { description?: string; name?: string; title?: string }) | null+ >(null);+ const [loadingRemoteData, setLoadingRemoteData] = useState(false);+ const [showResultModal, setShowResultModal] = useState(false);+ const [publishResult, setPublishResult] = useState<{ identifier?: string }>({});++ const messageKey = isSubmit ? 'submit' : 'upload-version';+ const loadingMessage = isSubmit+ ? t('marketPublish.modal.loading.submit')+ : t('marketPublish.modal.loading.upload');+ const submitButtonText = t('marketPublish.modal.submitButton');+ const modalTitle = isSubmit+ ? t('marketPublish.modal.title.submit')+ : t('marketPublish.modal.title.upload');++ useEffect(() => {+ if (!isUpload) return;+ const marketIdentifier = meta?.marketIdentifier;+ const accessToken = marketSession?.accessToken;+ if (!open || !isAuthenticated || !accessToken || !marketIdentifier) return;++ let cancelled = false;++ const run = async () => {+ try {+ setLoadingRemoteData(true);+ marketApiService.setAccessToken(accessToken);+ const data = await marketApiService.getAgentDetail(marketIdentifier);+ if (!cancelled) {+ console.log('data', data);+ setRemoteAgentData(data);+ }+ } catch (error) {+ console.error('Failed to fetch remote agent data:', error);+ if (!cancelled) {+ message.error(t('marketPublish.modal.messages.fetchRemoteFailed'));+ }+ } finally {+ if (!cancelled) {+ setLoadingRemoteData(false);+ }+ }+ };++ void run();++ return () => {+ cancelled = true;+ };+ }, [isAuthenticated, isUpload, marketSession?.accessToken, meta?.marketIdentifier, open]);++ const tokenUsage = useTokenCount(systemRole);++ const handleSubmit = useCallback(+ async (values: MarketPublishFormValues) => {+ if (!isAuthenticated || !marketSession?.accessToken) {+ message.error(t('marketPublish.modal.messages.notAuthenticated'));+ return false;+ }++ const changelog = values.changelog?.trim();+ if (!changelog) {+ message.error({ content: t('marketPublish.modal.changelog.required'), key: messageKey });+ return false;+ }++ let identifier = meta?.marketIdentifier;++ try {+ message.loading({ content: loadingMessage, key: messageKey });+ marketApiService.setAccessToken(marketSession.accessToken);++ if (isSubmit) {+ identifier = values.identifier?.trim();+ if (!identifier) {+ message.error({ content: t('marketPublish.modal.identifier.required'), key: messageKey });+ return false;+ }++ try {+ await marketApiService.getAgentDetail(identifier);+ } catch {+ const createPayload: Record<string, unknown> = {+ identifier,+ name: meta?.title || '',+ };+ await marketApiService.createAgent(createPayload as any);+ }+ } else if (!identifier) {+ message.error({ content: t('marketPublish.modal.messages.missingIdentifier'), key: messageKey });+ return false;+ }++ const versionPayload = {+ avatar: meta?.avatar,+ changelog,+ config: {+ chatConfig: {+ displayMode: chatConfig?.displayMode,+ enableHistoryCount: chatConfig?.enableHistoryCount,+ historyCount: chatConfig?.historyCount,+ maxTokens: agentConfig?.params?.max_tokens,+ searchMode: chatConfig?.searchMode,+ temperature: agentConfig?.params?.temperature,+ topP: agentConfig?.params?.top_p,+ },+ description: meta?.description,+ locale: language,+ model: {+ model,+ parameters: agentConfig?.params,+ provider,+ },+ plugins:+ plugins?.map((plugin) => ({+ enabled: true,+ identifier: plugin,+ settings: {},+ })) || [],+ systemRole: systemRole,+ },+ description: meta?.description || '',+ identifier: identifier,+ name: meta?.title || '',+ tags: meta?.tags,+ tokenUsage: tokenUsage,+ };++ try {+ await marketApiService.createAgentVersion(versionPayload);+ } catch (versionError) {+ const errorMessage = versionError instanceof Error ? versionError.message : '未知错误';+ message.error({+ content: t('marketPublish.modal.messages.createVersionFailed', { message: errorMessage }),+ key: messageKey,+ });+ return false;+ }++ if (isSubmit) {+ updateSessionMeta({ marketIdentifier: identifier });+ }++ setPublishResult({ identifier });+ setShowResultModal(true);++ message.destroy(messageKey);+ onSuccess?.();+ return true;+ } catch (error) {+ console.error('Market publish failed:', error);+ const errorMessage = error instanceof Error ? error.message : '发布失败';+ message.error({ content: t('marketPublish.modal.messages.publishFailed', { message: errorMessage }), key: messageKey });+ return false;+ }+ },+ [+ agentConfig?.params,+ chatConfig?.displayMode,+ chatConfig?.enableHistoryCount,+ chatConfig?.historyCount,+ chatConfig?.searchMode,+ isAuthenticated,+ isSubmit,+ language,+ meta?.avatar,+ meta?.description,+ meta?.marketIdentifier,+ meta?.tags,+ meta?.title,+ marketSession?.accessToken,+ messageKey,+ loadingMessage,+ model,+ onSuccess,+ plugins,+ provider,+ systemRole,+ tokenUsage,+ updateSessionMeta,+ ],+ );++ return (+ <>+ <ModalForm<MarketPublishFormValues>+ modalProps={{+ bodyStyle: { height: '70vh', overflow: 'auto' },+ destroyOnClose: true,+ onCancel,+ style: { minWidth: 750 },+ }}+ onFinish={handleSubmit}+ open={open}+ submitter={{+ resetButtonProps: {+ style: { display: 'none' },+ },+ submitButtonProps: {+ children: submitButtonText,+ },+ }}+ title={modalTitle}+ width="80vw"+ >+ {isSubmit && (+ <ProFormText+ extra={t('marketPublish.modal.identifier.extra')}+ label={t('marketPublish.modal.identifier.label')}+ name="identifier"+ placeholder={t('marketPublish.modal.identifier.placeholder')}+ rules={[+ { message: t('marketPublish.modal.identifier.required'), required: true },+ { message: t('marketPublish.modal.identifier.patternError'), pattern: /^[\da-z-]+$/ },+ { max: 50, message: t('marketPublish.modal.identifier.lengthError'), min: 3 },+ ]}+ />+ )}++ <ProFormText+ extra={t('marketPublish.modal.changelog.extra')}+ label={t('marketPublish.modal.changelog.label')}+ name="changelog"+ placeholder={t('marketPublish.modal.changelog.placeholder')}+ rules={[+ { message: t('marketPublish.modal.changelog.required'), required: true },+ { max: 500, message: t('marketPublish.modal.changelog.maxLengthError') },+ ]}+ />++ {isUpload ? (+ <Row gutter={24}>+ <Col span={12}>+ <div style={{ border: '1px solid #d9d9d9', borderRadius: '6px', padding: '16px' }}>+ <h3 style={{ marginBottom: '16px', textAlign: 'center' }}>+ {t('marketPublish.modal.comparison.remote')}+ </h3>+ {loadingRemoteData ? (+ <div style={{ padding: '40px', textAlign: 'center' }}>+ <Spin size="large" />+ <div style={{ marginTop: '16px' }}>+ {t('marketPublish.modal.loading.fetchingRemote')}+ </div>+ </div>+ ) : (+ <AgentInfoDescription isRemote={true} meta={remoteAgentData || undefined} />+ )}+ </div>+ </Col>+ <Col span={12}>+ <div style={{ border: '1px solid #d9d9d9', borderRadius: '6px', padding: '16px' }}>+ <h3 style={{ marginBottom: '16px', textAlign: 'center' }}>+ {t('marketPublish.modal.comparison.local')}+ </h3>+ <AgentInfoDescription+ agentConfig={agentConfig}+ chatConfig={chatConfig}+ files={files}+ knowledgeBases={knowledgeBases}+ meta={meta}+ model={model}+ plugins={plugins}+ provider={provider}+ systemRole={systemRole}+ ttsConfig={ttsConfig}+ />+ </div>+ </Col>+ </Row>+ ) : (+ <div style={{ marginTop: 24 }}>+ <AgentInfoDescription+ agentConfig={agentConfig}+ chatConfig={chatConfig}+ files={files}+ knowledgeBases={knowledgeBases}+ meta={meta}+ model={model}+ plugins={plugins}+ provider={provider}+ systemRole={systemRole}+ ttsConfig={ttsConfig}+ />+ </div>+ )}+ </ModalForm>++ <PublishResultModal+ identifier={publishResult.identifier}+ onCancel={() => setShowResultModal(false)}+ open={showResultModal}+ />+ </>+ );+ },+);++MarketPublishModal.displayName = 'MarketPublishModal';++export default MarketPublishModal;diff --git a/src/app/[variants]/(main)/chat/settings/features/SmartAgentActionButton/index.tsx b/src/app/[variants]/(main)/chat/settings/features/SmartAgentActionButton/index.tsxnew file mode 100644index 00000000000..5240a924c78--- /dev/null+++ b/src/app/[variants]/(main)/chat/settings/features/SmartAgentActionButton/index.tsx@@ -0,0 +1,75 @@+import { Button } from '@lobehub/ui';+import isEqual from 'fast-deep-equal';+import { Loader2 } from 'lucide-react';+import { memo, useMemo } from 'react';+import { useTranslation } from 'react-i18next';++import { useAgentOwnershipCheck } from '@/hooks/useAgentOwnershipCheck';+import { useSessionStore } from '@/store/session';+import { sessionMetaSelectors } from '@/store/session/selectors';++import MarketPublishButton from './MarketPublishButton';++interface SmartAgentActionButtonProps {+ modal?: boolean;+}++/**+ * 智能Agent操作按钮组件+ * 根据Agent的所有权自动决定显示"提交新Agent"还是"上传新版本"按钮+ */+const SmartAgentActionButton = memo<SmartAgentActionButtonProps>(({ modal }) => {+ const { t } = useTranslation('setting');+ const meta = useSessionStore(sessionMetaSelectors.currentAgentMeta, isEqual);+ const { isOwnAgent } = useAgentOwnershipCheck(meta?.marketIdentifier);++ const buttonType = useMemo(() => {+ if (!meta?.marketIdentifier) {+ return 'submit';+ }++ if (isOwnAgent === null) {+ return 'loading';+ }++ if (isOwnAgent === true) {+ return 'upload';+ }++ return 'submit';+ }, [meta?.marketIdentifier, isOwnAgent]);++ switch (buttonType) {+ case 'upload': {+ return (+ <MarketPublishButton+ action="upload"+ marketIdentifier={meta?.marketIdentifier}+ modal={modal}+ />+ );+ }++ case 'submit': {+ return (+ <MarketPublishButton+ action="submit"+ marketIdentifier={meta?.marketIdentifier}+ modal={modal}+ />+ );+ }++ default: {+ return (+ <Button block={Boolean(modal)} disabled icon={Loader2} loading variant={'filled'}>+ {t('checkingPermissions')}+ </Button>+ );+ }+ }+});++SmartAgentActionButton.displayName = 'SmartAgentActionButton';++export default SmartAgentActionButton;diff --git a/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/SubmitAgentModal.tsx b/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/SubmitAgentModal.tsxdeleted file mode 100644index f40b8b953c8..00000000000--- a/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/SubmitAgentModal.tsx+++ /dev/null@@ -1,98 +0,0 @@-'use client';--import { Alert, Button, Input, Modal, type ModalProps } from '@lobehub/ui';-import { Divider } from 'antd';-import { useTheme } from 'antd-style';-import isEqual from 'fast-deep-equal';-import { kebabCase } from 'lodash-es';-import qs from 'query-string';-import { memo, useState } from 'react';-import { useTranslation } from 'react-i18next';-import { Flexbox } from 'react-layout-kit';--import { AGENTS_INDEX_GITHUB_ISSUE } from '@/const/url';-import AgentInfo from '@/features/AgentInfo';-import { useAgentStore } from '@/store/agent';-import { agentSelectors } from '@/store/agent/selectors';-import { useGlobalStore } from '@/store/global';-import { globalGeneralSelectors } from '@/store/global/selectors';-import { useSessionStore } from '@/store/session';-import { sessionMetaSelectors } from '@/store/session/selectors';--const SubmitAgentModal = memo<ModalProps>(({ open, onCancel }) => {- const { t } = useTranslation('setting');- const [identifier, setIdentifier] = useState('');- const systemRole = useAgentStore(agentSelectors.currentAgentSystemRole);- const theme = useTheme();- const meta = useSessionStore(sessionMetaSelectors.currentAgentMeta, isEqual);- const language = useGlobalStore(globalGeneralSelectors.currentLanguage);-- const isMetaPass = Boolean(- meta && meta.title && meta.description && (meta.tags as string[])?.length > 0 && meta.avatar,- );-- const handleSubmit = () => {- const body = [- '### systemRole',- systemRole,- '### identifier',- kebabCase(identifier),- '### avatar',- meta.avatar,- '### title',- meta.title,- '### description',- meta.description,- '### tags',- (meta.tags as string[]).join(', '),- '### locale',- language,- ].join('\n\n');-- const url = qs.stringifyUrl({- query: { body, labels: '🤖 Agent PR', title: `[Agent] ${meta.title}` },- url: AGENTS_INDEX_GITHUB_ISSUE,- });-- window.open(url, '_blank');- };-- return (- <Modal- allowFullscreen- footer={- <Button- block- disabled={!isMetaPass || !identifier}- onClick={handleSubmit}- size={'large'}- type={'primary'}- >- {t('submitAgentModal.button')}- </Button>- }- onCancel={onCancel}- open={open}- title={t('submitAgentModal.tooltips')}- >- <Flexbox gap={16}>- {!isMetaPass && (- <Alert message={t('submitAgentModal.metaMiss')} showIcon type={'warning'} />- )}- <AgentInfo meta={meta} systemRole={systemRole} />- <Divider style={{ margin: '8px 0' }} />- <strong>- <span style={{ color: theme.colorError, marginRight: 4 }}>*</span>- {t('submitAgentModal.identifier')}- </strong>- <Input- onChange={(e) => setIdentifier(e.target.value)}- placeholder={t('submitAgentModal.placeholder')}- value={identifier}- />- </Flexbox>- </Modal>- );-});--export default SubmitAgentModal;diff --git a/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/index.tsx b/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/index.tsxdeleted file mode 100644index 7f7ff6c5a27..00000000000--- a/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/index.tsx+++ /dev/null@@ -1,35 +0,0 @@-import { ActionIcon, Button } from '@lobehub/ui';-import { Share2 } from 'lucide-react';-import { memo, useState } from 'react';-import { useTranslation } from 'react-i18next';--import { HEADER_ICON_SIZE } from '@/const/layoutTokens';-import { useServerConfigStore } from '@/store/serverConfig';--import SubmitAgentModal from './SubmitAgentModal';--const SubmitAgentButton = memo<{ modal?: boolean }>(({ modal }) => {- const { t } = useTranslation('setting');- const mobile = useServerConfigStore((s) => s.isMobile);- const [isModalOpen, setIsModalOpen] = useState(false);-- return (- <>- {modal ? (- <Button block icon={Share2} onClick={() => setIsModalOpen(true)} variant={'filled'}>- {t('submitAgentModal.tooltips')}- </Button>- ) : (- <ActionIcon- icon={Share2}- onClick={() => setIsModalOpen(true)}- size={HEADER_ICON_SIZE(mobile)}- title={t('submitAgentModal.tooltips')}- />- )}- <SubmitAgentModal onCancel={() => setIsModalOpen(false)} open={isModalOpen} />- </>- );-});--export default SubmitAgentButton;diff --git a/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/style.ts b/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/style.tsdeleted file mode 100644index b5b76d54041..00000000000--- a/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/style.ts+++ /dev/null@@ -1,47 +0,0 @@-import { createStyles } from 'antd-style';--export const useStyles = createStyles(({ css, token, prefixCls }) => ({- author: css`- font-size: 12px;- `,-- avatar: css`- flex: none;- `,- container: css`- position: relative;- padding-block: 16px 24px;- padding-inline: 16px;- border-block-end: 1px solid ${token.colorBorderSecondary};- `,- date: css`- font-size: 12px;- color: ${token.colorTextDescription};- `,- desc: css`- color: ${token.colorTextDescription};- text-align: center;- `,- loading: css`- .${prefixCls}-skeleton-content {- display: flex;- flex-direction: column;- }- `,- nav: css`- padding-block-start: 4px;-- .${prefixCls}-tabs-tab {- margin: 4px !important;-- + .${prefixCls}-tabs-tab {- margin: 4px !important;- }- }- `,- title: css`- font-size: 20px;- font-weight: 600;- text-align: center;- `,-}));diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/AssistantDetailPage.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/AssistantDetailPage.tsxindex fc9e7c857d2..792a92d630e 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/AssistantDetailPage.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/AssistantDetailPage.tsx@@ -5,8 +5,9 @@ import { Flexbox } from 'react-layout-kit';import { useParams } from 'react-router-dom';import { withSuspense } from '@/components/withSuspense';+import { useQuery } from '@/hooks/useQuery';import { useDiscoverStore } from '@/store/discover';-import { DiscoverTab } from '@/types/discover';+import { AssistantMarketSource, DiscoverTab } from '@/types/discover';import NotFound from '../components/NotFound';import Breadcrumb from '../features/Breadcrumb';@@ -14,6 +15,7 @@ import { TocProvider } from '../features/Toc/useToc';import { DetailProvider } from './[...slugs]/features/DetailProvider';import Details from './[...slugs]/features/Details';import Header from './[...slugs]/features/Header';+import StatusPage from './[...slugs]/features/StatusPage';import Loading from './[...slugs]/loading';interface AssistantDetailPageProps {@@ -24,13 +26,20 @@ const AssistantDetailPage = memo<AssistantDetailPageProps>(({ mobile }) => {const params = useParams();const slugs = params['*']?.split('/') || [];const identifier = decodeURIComponent(slugs.join('/'));+ const { version, source } = useQuery() as { source?: AssistantMarketSource; version?: string };const useAssistantDetail = useDiscoverStore((s) => s.useAssistantDetail);- const { data, isLoading } = useAssistantDetail({ identifier });+ const { data, isLoading } = useAssistantDetail({ identifier, source, version });if (isLoading) return <Loading />;if (!data) return <NotFound />;+ // 检查助手状态+ const status = (data as any)?.status;+ if (status === 'unpublished' || status === 'archived' || status === 'deprecated') {+ return <StatusPage status={status} />;+ }+return (<TocProvider><DetailProvider config={data}>diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/Client.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/Client.tsxindex ee8e409b0cc..324a1ba923d 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/Client.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/Client.tsx@@ -5,12 +5,15 @@ import { memo } from 'react';import { Flexbox } from 'react-layout-kit';import { withSuspense } from '@/components/withSuspense';+import { useQuery } from '@/hooks/useQuery';import { useDiscoverStore } from '@/store/discover';+import { AssistantMarketSource } from '@/types/discover';import { TocProvider } from '../../features/Toc/useToc';import { DetailProvider } from './features/DetailProvider';import Details from './features/Details';import Header from './features/Header';+import StatusPage from './features/StatusPage';import Loading from './loading';interface ClientProps {@@ -19,12 +22,20 @@ interface ClientProps {}const Client = memo<ClientProps>(({ identifier, mobile }) => {+ const { version, source } = useQuery() as { source?: AssistantMarketSource; version?: string };+ const marketSource = source as AssistantMarketSource | undefined;const useAssistantDetail = useDiscoverStore((s) => s.useAssistantDetail);- const { data, isLoading } = useAssistantDetail({ identifier });+ const { data, isLoading } = useAssistantDetail({ identifier, source: marketSource, version });if (isLoading) return <Loading />;if (!data) return notFound();+ // 检查助手状态+ const status = (data as any)?.status;+ if (status === 'unpublished' || status === 'archived' || status === 'deprecated') {+ return <StatusPage status={status} />;+ }+return (<TocProvider><DetailProvider config={data}>diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Nav.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Nav.tsxindex 26b56b1da09..2d9e9f2d1e5 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Nav.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Nav.tsx@@ -2,7 +2,7 @@import { Icon, Tabs, Tag } from '@lobehub/ui';import { createStyles } from 'antd-style';-import { BookOpenIcon, LayersIcon, ListIcon, SquareUserIcon } from 'lucide-react';+import { BookOpenIcon, HistoryIcon, LayersIcon, ListIcon, SquareUserIcon } from 'lucide-react';import Link from 'next/link';import { memo } from 'react';import { useTranslation } from 'react-i18next';@@ -10,7 +10,9 @@ import { Flexbox } from 'react-layout-kit';import urlJoin from 'url-join';import { SOCIAL_URL } from '@/const/branding';-import { AssistantNavKey, McpNavKey } from '@/types/discover';+import { AGENTS_INDEX_GITHUB, AGENTS_OFFICIAL_URL } from '@/const/url';+import { useQuery } from '@/hooks/useQuery';+import { AssistantNavKey } from '@/types/discover';import { useDetailContext } from '../DetailProvider';@@ -38,6 +40,13 @@ const Nav = memo<NavProps>(({ mobile, setActiveTab, activeTab = AssistantNavKey.const { t } = useTranslation('discover');const { pluginCount, knowledgeCount, identifier } = useDetailContext();const { styles } = useStyles();+ const { source } = useQuery() as { source?: string };+ const isLegacy = source === 'legacy';+ const marketplaceLink = identifier+ ? isLegacy+ ? urlJoin(AGENTS_INDEX_GITHUB, 'tree/main/locales', identifier)+ : urlJoin(AGENTS_OFFICIAL_URL, identifier)+ : undefined;const capabilitiesCount = Number(pluginCount) + Number(knowledgeCount);@@ -76,9 +85,14 @@ const Nav = memo<NavProps>(({ mobile, setActiveTab, activeTab = AssistantNavKey.t('assistants.details.capabilities.title')),},+ {+ icon: <Icon icon={HistoryIcon} size={16} />,+ key: AssistantNavKey.Version,+ label: t('assistants.details.version.title'),+ },{icon: <Icon icon={ListIcon} size={16} />,- key: McpNavKey.Related,+ key: AssistantNavKey.Related,label: t('assistants.details.related.title'),},]}@@ -95,15 +109,8 @@ const Nav = memo<NavProps>(({ mobile, setActiveTab, activeTab = AssistantNavKey.<Link className={styles.link} href={SOCIAL_URL.discord} target={'_blank'}>{t('mcp.details.nav.needHelp')}</Link>- {identifier && (- <Link- className={styles.link}- href={urlJoin(- 'https://github.com/lobehub/lobe-chat-agents/tree/main/locales',- identifier,- )}- target={'_blank'}- >+ {identifier && marketplaceLink && (+ <Link className={styles.link} href={marketplaceLink} target={'_blank'}>{t('mcp.details.nav.viewSourceCode')}</Link>)}diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Overview/TagList.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Overview/TagList.tsxindex c897487da60..1c3afabfa51 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Overview/TagList.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Overview/TagList.tsx@@ -7,6 +7,9 @@ import qs from 'query-string';import { memo } from 'react';import { Flexbox } from 'react-layout-kit';+import { useQuery } from '@/hooks/useQuery';+import { AssistantMarketSource } from '@/types/discover';+const useStyles = createStyles(({ token, css }) => {return {tag: css`@@ -22,18 +25,24 @@ const useStyles = createStyles(({ token, css }) => {const TagList = memo<{ tags: string[] }>(({ tags }) => {const { styles } = useStyles();+ const { source } = useQuery() as { source?: AssistantMarketSource };+ const marketSource = source === 'legacy' ? 'legacy' : undefined;const showTags = Boolean(tags?.length && tags?.length > 0);return (showTags && (<Flexbox gap={8} horizontal wrap={'wrap'}>{tags.map((tag) => (<Link- href={qs.stringifyUrl({- query: {- q: tag,+ href={qs.stringifyUrl(+ {+ query: {+ q: tag,+ source: marketSource,+ },+ url: '/discover/assistant',},- url: '/discover/assistant',- })}+ { skipNull: true },+ )}key={tag}><Tag className={styles.tag}>{tag}</Tag>diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Overview/index.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Overview/index.tsxindex 89a05bf79dc..0bebdb712f3 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Overview/index.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Overview/index.tsx@@ -31,7 +31,9 @@ const Overview = memo(() => {backgroundColor,config,} = useDetailContext();+ console.log('examples', examples);+ console.log('summary', summary);const data: any = [{content: config?.openingMessage,diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Related/index.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Related/index.tsxindex 2aa0d0f4ad0..8f1ae177301 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Related/index.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Related/index.tsx@@ -3,6 +3,9 @@ import { memo } from 'react';import { useTranslation } from 'react-i18next';import { Flexbox } from 'react-layout-kit';+import { useQuery } from '@/hooks/useQuery';+import { AssistantMarketSource } from '@/types/discover';+import McpList from '../../../../../../(list)/assistant/features/List';import Title from '../../../../../../features/Title';import { useDetailContext } from '../../DetailProvider';@@ -10,16 +13,22 @@ import { useDetailContext } from '../../DetailProvider';const Related = memo(() => {const { t } = useTranslation('discover');const { related, category } = useDetailContext();+ const { source } = useQuery() as { source?: AssistantMarketSource };+ const marketSource = source === 'legacy' ? 'legacy' : undefined;return (<Flexbox gap={16}><Titlemore={t('assistants.details.related.more')}- moreLink={qs.stringifyUrl({- query: {- category,+ moreLink={qs.stringifyUrl(+ {+ query: {+ category,+ source: marketSource,+ },+ url: '/discover/assistant',},- url: '/discover/assistant',- })}+ { skipNull: true },+ )}>{t('assistants.details.related.listTitle')}</Title>diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/SystemRole/TagList.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/SystemRole/TagList.tsxindex c897487da60..1c3afabfa51 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/SystemRole/TagList.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/SystemRole/TagList.tsx@@ -7,6 +7,9 @@ import qs from 'query-string';import { memo } from 'react';import { Flexbox } from 'react-layout-kit';+import { useQuery } from '@/hooks/useQuery';+import { AssistantMarketSource } from '@/types/discover';+const useStyles = createStyles(({ token, css }) => {return {tag: css`@@ -22,18 +25,24 @@ const useStyles = createStyles(({ token, css }) => {const TagList = memo<{ tags: string[] }>(({ tags }) => {const { styles } = useStyles();+ const { source } = useQuery() as { source?: AssistantMarketSource };+ const marketSource = source === 'legacy' ? 'legacy' : undefined;const showTags = Boolean(tags?.length && tags?.length > 0);return (showTags && (<Flexbox gap={8} horizontal wrap={'wrap'}>{tags.map((tag) => (<Link- href={qs.stringifyUrl({- query: {- q: tag,+ href={qs.stringifyUrl(+ {+ query: {+ q: tag,+ source: marketSource,+ },+ url: '/discover/assistant',},- url: '/discover/assistant',- })}+ { skipNull: true },+ )}key={tag}><Tag className={styles.tag}>{tag}</Tag>diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/SystemRole/index.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/SystemRole/index.tsxindex 10affe2b7ec..e0874f44795 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/SystemRole/index.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/SystemRole/index.tsx@@ -15,38 +15,52 @@ const Overview = memo(() => {const { t } = useTranslation('discover');const { tokenUsage, tags = [], config } = useDetailContext();const theme = useTheme();++ const { systemRole, openingMessage, openingQuestions } = config || {};return (<Flexbox gap={16}>- <Title tag={tokenUsage && <TokenTag tokenUsage={tokenUsage} />}>- {t('assistants.details.systemRole.title')}- </Title>- <Block gap={16} padding={16} variant={'outlined'}>- {<MarkdownRender>{config?.systemRole.trimEnd()}</MarkdownRender>}- <TagList tags={tags} />- </Block>- <Title>{t('assistants.details.systemRole.openingMessage')}</Title>- <Block align={'flex-start'} gap={12} horizontal padding={16} variant={'outlined'}>- <Icon- color={theme.colorError}- icon={MessageCircleHeartIcon}- size={20}- style={{- marginTop: 4,- }}- />- <MarkdownRender>{config?.openingMessage?.trimEnd()}</MarkdownRender>- </Block>- <Title tag={<Tag>{config?.openingQuestions?.length}</Tag>}>- {t('assistants.details.systemRole.openingQuestions')}- </Title>- <Flexbox gap={8}>- {config?.openingQuestions?.map((item, key) => (- <Block gap={12} horizontal key={key} padding={16} variant={'outlined'}>- <Icon color={theme.colorWarning} icon={MessageCircleQuestionIcon} size={20} />- <MarkdownRender>{item}</MarkdownRender>+ {systemRole && (+ <>+ <Title tag={tokenUsage && <TokenTag tokenUsage={tokenUsage} />}>+ {t('assistants.details.systemRole.title')}+ </Title>+ <Block gap={16} padding={16} variant={'outlined'}>+ {<MarkdownRender>{systemRole.trimEnd()}</MarkdownRender>}+ <TagList tags={tags} />+ </Block>+ </>+ )}+ {openingMessage && (+ <>+ <Title>{t('assistants.details.systemRole.openingMessage')}</Title>+ <Block align={'flex-start'} gap={12} horizontal padding={16} variant={'outlined'}>+ <Icon+ color={theme.colorError}+ icon={MessageCircleHeartIcon}+ size={20}+ style={{+ marginTop: 4,+ }}+ />+ <MarkdownRender>{openingMessage?.trimEnd()}</MarkdownRender></Block>- ))}- </Flexbox>+ </>+ )}+ {openingQuestions && (+ <>+ <Title tag={<Tag>{openingQuestions?.length}</Tag>}>+ {t('assistants.details.systemRole.openingQuestions')}+ </Title>+ <Flexbox gap={8}>+ {openingQuestions?.map((item, key) => (+ <Block gap={12} horizontal key={key} padding={16} variant={'outlined'}>+ <Icon color={theme.colorWarning} icon={MessageCircleQuestionIcon} size={20} />+ <MarkdownRender>{item}</MarkdownRender>+ </Block>+ ))}+ </Flexbox>+ </>+ )}</Flexbox>);});diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Versions/index.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Versions/index.tsxnew file mode 100644index 00000000000..6a76763f70e--- /dev/null+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/Versions/index.tsx@@ -0,0 +1,137 @@+import { Block, Icon, Tag } from '@lobehub/ui';+import { useTheme } from 'antd-style';+import { CheckIcon, MinusIcon } from 'lucide-react';+import Link from 'next/link';+import { usePathname } from 'next/navigation';+import qs from 'query-string';+import { memo, useMemo } from 'react';+import { useTranslation } from 'react-i18next';+import { Flexbox } from 'react-layout-kit';++import InlineTable from '@/components/InlineTable';+import PublishedTime from '@/components/PublishedTime';+import { useQuery } from '@/hooks/useQuery';+import { AssistantMarketSource, AssistantNavKey } from '@/types/discover';++import Title from '../../../../../../features/Title';+import { useDetailContext } from '../../DetailProvider';++const Versions = memo(() => {+ const { t } = useTranslation('discover');+ const theme = useTheme();+ const pathname = usePathname();+ const { versions = [], currentVersion } = useDetailContext();+ const { source } = useQuery() as { source?: AssistantMarketSource };+ const marketSource = source === 'legacy' ? 'legacy' : undefined;++ const statusTagMap = useMemo(+ () => ({+ archived: {+ color: 'default' as const,+ label: t('assistants.details.version.status.archived'),+ },+ deprecated: {+ color: 'warning' as const,+ label: t('assistants.details.version.status.deprecated'),+ },+ }),+ [t],+ );++ const disableClickStatuses = useMemo(+ () => new Set<keyof typeof statusTagMap>(['archived', 'deprecated']),+ [],+ );++ if (!versions.length) {+ return (+ <Flexbox gap={16}>+ <Title>{t('assistants.details.version.title')}</Title>+ <Block padding={24} variant={'outlined'}>+ {t('assistants.details.version.empty')}+ </Block>+ </Flexbox>+ );+ }++ return (+ <Flexbox gap={16}>+ <Title>{t('assistants.details.version.title')}</Title>+ <Block variant={'outlined'}>+ <InlineTable+ columns={[+ {+ dataIndex: 'version',+ render: (_: any, record: any) =>+ (() => {+ const statusKey =+ record.status &&+ Object.prototype.hasOwnProperty.call(statusTagMap, record.status)+ ? (record.status as keyof typeof statusTagMap)+ : undefined;+ const statusMeta = statusKey ? statusTagMap[statusKey] : undefined;+ const content = (+ <Flexbox align={'center'} gap={8} horizontal>+ <code style={{ fontSize: 14 }}>{record.version}</code>+ {(record.isLatest || record.version === currentVersion) && (+ <Tag color={'info'}>{t('assistants.details.version.table.isLatest')}</Tag>+ )}+ {statusMeta && <Tag color={statusMeta.color}>{statusMeta.label}</Tag>}+ </Flexbox>+ );++ if (statusKey && disableClickStatuses.has(statusKey)) return content;++ return (+ <Link+ href={qs.stringifyUrl(+ {+ query: {+ activeTab: AssistantNavKey.Version,+ source: marketSource,+ version: record.version,+ },+ url: pathname,+ },+ { skipNull: true },+ )}+ style={{ color: 'inherit' }}+ >+ {content}+ </Link>+ );+ })(),+ title: t('assistants.details.version.table.version'),+ },+ {+ align: 'center',+ dataIndex: 'isValidated',+ render: (_: any, record: any) => (+ <Icon+ color={record.isValidated ? theme.colorSuccess : theme.colorTextDescription}+ icon={record.isValidated ? CheckIcon : MinusIcon}+ />+ ),+ title: t('assistants.details.version.table.isValidated'),+ },+ {+ align: 'end',+ dataIndex: 'createdAt',+ render: (_: any, record: any) => (+ <PublishedTime date={record.createdAt} showPrefix={false} />+ ),+ title: t('assistants.details.version.table.publishAt'),+ },+ ]}+ dataSource={versions}+ rowKey={'version'}+ size={'middle'}+ />+ </Block>+ </Flexbox>+ );+});++Versions.displayName = 'AssistantVersions';++export default Versions;diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/index.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/index.tsxindex 4183d45fe6e..772ca48e1e1 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/index.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Details/index.tsx@@ -13,6 +13,7 @@ import Nav from './Nav';import Overview from './Overview';import Related from './Related';import SystemRole from './SystemRole';+import Versions from './Versions';const Details = memo<{ mobile?: boolean }>(({ mobile: isMobile }) => {const { mobile = isMobile } = useResponsive();@@ -38,6 +39,7 @@ const Details = memo<{ mobile?: boolean }>(({ mobile: isMobile }) => {{activeTab === AssistantNavKey.Overview && <Overview />}{activeTab === AssistantNavKey.SystemRole && <SystemRole />}{activeTab === AssistantNavKey.Capabilities && <Capabilities />}+ {activeTab === AssistantNavKey.Version && <Versions />}{activeTab === AssistantNavKey.Related && <Related />}</Flexbox><Sidebar mobile={mobile} />diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Header.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Header.tsxindex a0dc252f72c..98dc963793b 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Header.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Header.tsx@@ -4,12 +4,11 @@ import { Github, MCP } from '@lobehub/icons';import { ActionIcon, Avatar, Button, Icon, Text, Tooltip } from '@lobehub/ui';import { createStyles, useResponsive } from 'antd-style';import { BookTextIcon, CoinsIcon, DotIcon } from 'lucide-react';-import NextLink from 'next/link';+import Link from 'next/link';import qs from 'query-string';import { memo } from 'react';import { useTranslation } from 'react-i18next';import { Flexbox } from 'react-layout-kit';-import { Link as RouterLink } from 'react-router-dom';import urlJoin from 'url-join';import { formatIntergerNumber } from '@/utils/format';@@ -53,16 +52,16 @@ const Header = memo<{ mobile?: boolean }>(({ mobile: isMobile }) => {const cate = categories.find((c) => c.key === category);const cateButton = (- <RouterLink- to={qs.stringifyUrl({+ <Link+ href={qs.stringifyUrl({query: { category: cate?.key },- url: '/assistant',+ url: '/discover/assistant',})}><Button icon={cate?.icon} size={'middle'} variant={'outlined'}>{cate?.label}</Button>- </RouterLink>+ </Link>);return (@@ -106,7 +105,7 @@ const Header = memo<{ mobile?: boolean }>(({ mobile: isMobile }) => {</Text></Flexbox><Flexbox align={'center'} gap={6} horizontal>- <NextLink+ <Linkhref={urlJoin('https://github.com/lobehub/lobe-chat-agents/tree/main/locales',identifier as string,@@ -115,14 +114,14 @@ const Header = memo<{ mobile?: boolean }>(({ mobile: isMobile }) => {target={'_blank'}><ActionIcon fill={theme.colorTextDescription} icon={Github} />- </NextLink>+ </Link></Flexbox></Flexbox><Flexbox align={'center'} gap={4} horizontal>{author && (- <NextLink href={urlJoin('https://github.com', author)} target={'_blank'}>+ <Link href={urlJoin('https://github.com', author)} target={'_blank'}>{author}- </NextLink>+ </Link>)}<Icon icon={DotIcon} /><PublishedTimediff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Sidebar/ActionButton/AddAgent.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Sidebar/ActionButton/AddAgent.tsxindex 289906bc04e..7404d4e99ae 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Sidebar/ActionButton/AddAgent.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Sidebar/ActionButton/AddAgent.tsx@@ -10,6 +10,7 @@ import { useTranslation } from 'react-i18next';import { SESSION_CHAT_URL } from '@/const/url';import { useSessionStore } from '@/store/session';+import type { LobeAgentConfig } from '@/types/agent';import { useDetailContext } from '../../DetailProvider';@@ -21,12 +22,54 @@ const useStyles = createStyles(({ css }) => ({`,}));+type MarketAgentModel =+ | LobeAgentConfig['model']+ | {+ model: LobeAgentConfig['model'];+ parameters?: Partial<LobeAgentConfig['params']>;+ provider?: LobeAgentConfig['provider'];+ };++type MarketAgentConfig = Partial<Omit<LobeAgentConfig, 'model' | 'params'>> & {+ model?: MarketAgentModel;+ params?: Partial<LobeAgentConfig['params']>;+};++const normalizeMarketAgentConfig = (+ config?: MarketAgentConfig,+): Partial<LobeAgentConfig> | undefined => {+ if (!config) return undefined;++ const { model, params, ...rest } = config;+ const normalized: Partial<LobeAgentConfig> = { ...rest };++ const modelInfo = model;++ const mergedParams: Partial<LobeAgentConfig['params']> = {};+ if (typeof modelInfo === 'object' && modelInfo) {+ Object.assign(mergedParams, modelInfo.parameters ?? {});+ normalized.provider = normalized.provider ?? modelInfo.provider;+ normalized.model = modelInfo.model;+ } else {+ normalized.model = modelInfo;+ }+ Object.assign(mergedParams, params ?? {});++ normalized.params = Object.keys(mergedParams).length > 0 ? mergedParams : undefined;++ normalized.plugins = normalized.plugins ?? [];++ return normalized;+};+const AddAgent = memo<{ mobile?: boolean }>(({ mobile }) => {- const { avatar, description, tags, title, config, backgroundColor } = useDetailContext();+ const { avatar, description, tags, title, config, backgroundColor, identifier } =+ useDetailContext();const { styles } = useStyles();const [isLoading, setIsLoading] = useState(false);const createSession = useSessionStore((s) => s.createSession);- const { message } = App.useApp();+ const sessions = useSessionStore((s) => s.sessions);+ const { message, modal } = App.useApp();const router = useRouter();const { t } = useTranslation('discover');@@ -34,29 +77,77 @@ const AddAgent = memo<{ mobile?: boolean }>(({ mobile }) => {avatar,backgroundColor,description,+ marketIdentifier: identifier,tags,title,};- const handleAddAgentAndConverse = async () => {+ const checkDuplicateAgent = () => {+ if (!identifier) return false;+ return sessions.some((session) => session.meta?.marketIdentifier === identifier);+ };++ const showDuplicateConfirmation = (callback: () => void) => {+ modal.confirm({+ cancelText: '取消',+ content: `当前已经添加过「${title}」Agent,是否需要重复添加?`,+ okText: '确认添加',+ onOk: callback,+ title: '重复添加确认',+ });+ };++ const createSessionWithMarketIdentifier = async (isSwitchSession = true) => {if (!config) return;- setIsLoading(true);- const session = await createSession({- config,+ const sessionData = {+ config: normalizeMarketAgentConfig(config),meta,- });- setIsLoading(false);- message.success(t('assistants.addAgentSuccess'));- router.push(SESSION_CHAT_URL(session, mobile));+ };++ const session = await createSession(sessionData, isSwitchSession);+ return session;+ };++ const handleCreateAndConverse = async () => {+ setIsLoading(true);+ try {+ const session = await createSessionWithMarketIdentifier(true);+ message.success(t('assistants.addAgentSuccess'));+ router.push(SESSION_CHAT_URL(session, mobile));+ } finally {+ setIsLoading(false);+ }+ };++ const handleCreate = async () => {+ setIsLoading(true);+ try {+ await createSessionWithMarketIdentifier(false);+ message.success(t('assistants.addAgentSuccess'));+ } finally {+ setIsLoading(false);+ }+ };++ const handleAddAgentAndConverse = async () => {+ if (!config) return;++ if (checkDuplicateAgent()) {+ showDuplicateConfirmation(handleCreateAndConverse);+ } else {+ await handleCreateAndConverse();+ }};const handleAddAgent = async () => {if (!config) return;- setIsLoading(true);- createSession({ config, meta }, false);- message.success(t('assistants.addAgentSuccess'));- setIsLoading(false);++ if (checkDuplicateAgent()) {+ showDuplicateConfirmation(handleCreate);+ } else {+ await handleCreate();+ }};return (diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Sidebar/Related/index.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Sidebar/Related/index.tsxindex 153abdfc032..1cd977792ae 100644--- a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Sidebar/Related/index.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Sidebar/Related/index.tsx@@ -6,29 +6,43 @@ import { Link } from 'react-router-dom';import urlJoin from 'url-join';import Title from '../../../../../../features/Title';+import { useQuery } from '@/hooks/useQuery';+import { AssistantMarketSource } from '@/types/discover';import { useDetailContext } from '../../DetailProvider';import Item from './Item';const Related = memo(() => {const { t } = useTranslation('discover');const { related, category } = useDetailContext();+ const { source } = useQuery() as { source?: AssistantMarketSource };+ const marketSource = source === 'legacy' ? 'legacy' : undefined;return (<Flexbox gap={16}><Titlemore={t('assistants.details.related.more')}- moreLink={qs.stringifyUrl({- query: {- category,+ moreLink={qs.stringifyUrl(+ {+ query: {+ category,+ source: marketSource,+ },+ url: '/discover/assistant',},- url: '/discover/assistant',- })}+ { skipNull: true },+ )}>{t('assistants.details.related.listTitle')}</Title><Flexbox gap={8}>{related?.map((item, index) => {- const link = urlJoin('/assistant', item.identifier);+ const link = qs.stringifyUrl(+ {+ query: marketSource ? { source: marketSource } : undefined,+ url: urlJoin('/discover/assistant', item.identifier),+ },+ { skipNull: true },+ );return (<Link key={index} style={{ color: 'inherit', overflow: 'hidden' }} to={link}><Item {...item} />diff --git a/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/StatusPage/index.tsx b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/StatusPage/index.tsxnew file mode 100644index 00000000000..5dc0b584381--- /dev/null+++ b/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/StatusPage/index.tsx@@ -0,0 +1,113 @@+'use client';++import {+ ClockCircleOutlined,+ ExclamationCircleOutlined,+ FolderOpenOutlined,+} from '@ant-design/icons';+import { Button, Result } from 'antd';+import { useRouter } from 'next/navigation';+import { memo } from 'react';+import { Trans, useTranslation } from 'react-i18next';++interface StatusPageProps {+ status: 'unpublished' | 'archived' | 'deprecated';+}++const StatusPage = memo<StatusPageProps>(({ status }) => {+ const router = useRouter();+ const { t } = useTranslation('discover');++ const handleBackToMarket = () => {+ router.push('/discover/assistant');+ };++ // 审核中状态+ if (status === 'unpublished') {+ return (+ <div+ style={{+ alignItems: 'center',+ display: 'flex',+ flex: 1,+ justifyContent: 'center',+ minHeight: '60vh',+ padding: '20px',+ }}+ >+ <Result+ extra={+ <Button onClick={handleBackToMarket} type="primary">+ {t('assistants.status.backToMarket')}+ </Button>+ }+ icon={<ClockCircleOutlined style={{ color: '#faad14' }} />}+ subTitle={+ <div style={{ color: '#666', lineHeight: 1.6 }}>+ <Trans i18nKey="assistants.status.unpublished.subtitle" ns="discover">+ 当前访问的助手正在进行版本审核中,如果有疑问复制链接发送问题到{' '}+ <a href="mailto:[email protected]" style={{ color: '#1890ff' }}>+ </a>{' '}+ 进行咨询。+ </Trans>+ </div>+ }+ title={t('assistants.status.unpublished.title')}+ />+ </div>+ );+ }++ // 归档/拒绝状态+ const isArchived = status === 'archived';+ const statusKey = isArchived ? 'archived' : 'deprecated';+ const statusIcon = isArchived ? (+ <FolderOpenOutlined style={{ color: '#8c8c8c' }} />+ ) : (+ <ExclamationCircleOutlined style={{ color: '#ff4d4f' }} />+ );++ return (+ <div+ style={{+ alignItems: 'center',+ display: 'flex',+ flex: 1,+ justifyContent: 'center',+ minHeight: '60vh',+ padding: '20px',+ }}+ >+ <Result+ extra={+ <Button onClick={handleBackToMarket} type="primary">+ {t('assistants.status.backToMarket')}+ </Button>+ }+ icon={statusIcon}+ subTitle={+ <div style={{ color: '#666', lineHeight: 1.6 }}>+ <p>{t(`assistants.status.${statusKey}.subtitle`)}</p>+ <ul style={{ margin: '16px 0', paddingLeft: '20px', textAlign: 'left' }}>+ <li>{t(`assistants.status.${statusKey}.reasons.owner`)}</li>+ <li>{t(`assistants.status.${statusKey}.reasons.official`)}</li>+ </ul>+ <p>+ <Trans i18nKey="assistants.status.support" ns="discover">+ 有各种问题请复制链接发送到{' '}+ <a href="mailto:[email protected]" style={{ color: '#1890ff' }}>+ </a>{' '}+ 进行咨询。+ </Trans>+ </p>+ </div>+ }+ title={t(`assistants.status.${statusKey}.title`)}+ />+ </div>+ );+});++export default StatusPage;diff --git a/src/app/[variants]/(main)/discover/(detail)/features/Breadcrumb.tsx b/src/app/[variants]/(main)/discover/(detail)/features/Breadcrumb.tsxindex 92327a6a1c5..ecb30f44f4d 100644--- a/src/app/[variants]/(main)/discover/(detail)/features/Breadcrumb.tsx+++ b/src/app/[variants]/(main)/discover/(detail)/features/Breadcrumb.tsx@@ -3,10 +3,11 @@import { CopyButton } from '@lobehub/ui';import { Breadcrumb as AntdBreadcrumb } from 'antd';import { useTheme } from 'antd-style';+import Link from 'next/link';import { memo } from 'react';import { useTranslation } from 'react-i18next';import { Flexbox } from 'react-layout-kit';-import { Link } from 'react-router-dom';+import urlJoin from 'url-join';import { DiscoverTab } from '@/types/discover';@@ -17,11 +18,11 @@ const Breadcrumb = memo<{ identifier: string; tab: DiscoverTab }>(({ tab, identi<AntdBreadcrumbitems={[{- title: <Link to={'/'}>Discover</Link>,+ title: <Link href={'/discover'}>Discover</Link>,},{title: (- <Link to={`/${tab}`}>+ <Link href={urlJoin('/discover', tab)}>{tab === DiscoverTab.Mcp ? 'MCP Servers' : t(`tab.${tab}` as any)}</Link>),diff --git a/src/app/[variants]/(main)/discover/(list)/_layout/Desktop/Nav.tsx b/src/app/[variants]/(main)/discover/(list)/_layout/Desktop/Nav.tsxindex 1886f9a5d75..a633a877fe6 100644--- a/src/app/[variants]/(main)/discover/(list)/_layout/Desktop/Nav.tsx+++ b/src/app/[variants]/(main)/discover/(list)/_layout/Desktop/Nav.tsx@@ -14,6 +14,7 @@ import { DiscoverTab } from '@/types/discover';import { MAX_WIDTH, SCROLL_PARENT_ID } from '../../../features/const';import { useNav } from '../../../features/useNav';import SortButton from '../../features/SortButton';+import MarketSourceSwitch from '../../assistant/features/MarketSourceSwitch';import { useScroll } from './useScroll';export const useStyles = createStyles(({ cx, stylish, css, token }) => ({@@ -88,7 +89,8 @@ const Nav = memo(() => {/></Flexbox>{!isHome && (- <Flexbox align={'center'} gap={4} horizontal>+ <Flexbox align={'center'} gap={8} horizontal>+ {activeKey === DiscoverTab.Assistants && <MarketSourceSwitch />}<SortButton /></Flexbox>)}diff --git a/src/app/[variants]/(main)/discover/(list)/assistant/AssistantPage.tsx b/src/app/[variants]/(main)/discover/(list)/assistant/AssistantPage.tsxindex 161c29c1d40..5c227fafd0a 100644--- a/src/app/[variants]/(main)/discover/(list)/assistant/AssistantPage.tsx+++ b/src/app/[variants]/(main)/discover/(list)/assistant/AssistantPage.tsx@@ -13,7 +13,7 @@ import List from './features/List';import Loading from './loading';const AssistantPage = memo<{ mobile?: boolean }>(() => {- const { q, page, category, sort, order } = useQuery() as AssistantQueryParams;+ const { q, page, category, sort, order, source } = useQuery() as AssistantQueryParams;const useAssistantList = useDiscoverStore((s) => s.useAssistantList);const { data, isLoading } = useAssistantList({category,@@ -22,8 +22,11 @@ const AssistantPage = memo<{ mobile?: boolean }>(() => {pageSize: 21,q,sort,+ source,});+ console.log("data",data)+if (isLoading || !data) return <Loading />;const { items, currentPage, pageSize, totalCount } = data;diff --git a/src/app/[variants]/(main)/discover/(list)/assistant/Client.tsx b/src/app/[variants]/(main)/discover/(list)/assistant/Client.tsxindex 70396f9a6a7..7238afeb05f 100644--- a/src/app/[variants]/(main)/discover/(list)/assistant/Client.tsx+++ b/src/app/[variants]/(main)/discover/(list)/assistant/Client.tsx@@ -6,22 +6,26 @@ import { Flexbox } from 'react-layout-kit';import { withSuspense } from '@/components/withSuspense';import { useQuery } from '@/hooks/useQuery';import { useDiscoverStore } from '@/store/discover';-import { AssistantQueryParams, DiscoverTab } from '@/types/discover';+import { AssistantMarketSource, AssistantQueryParams, DiscoverTab } from '@/types/discover';import Pagination from '../features/Pagination';import List from './features/List';import Loading from './loading';const Client = memo<{ mobile?: boolean }>(() => {- const { q, page, category, sort, order } = useQuery() as AssistantQueryParams;+ const { q, page, category, sort, order, ownerId, source } =+ useQuery() as AssistantQueryParams;+ const marketSource = (source as AssistantMarketSource | undefined) ?? 'new';const useAssistantList = useDiscoverStore((s) => s.useAssistantList);const { data, isLoading } = useAssistantList({category,order,+ ownerId,page,pageSize: 21,q,sort,+ source: marketSource,});if (isLoading || !data) return <Loading />;diff --git a/src/app/[variants]/(main)/discover/(list)/assistant/features/Category/index.tsx b/src/app/[variants]/(main)/discover/(list)/assistant/features/Category/index.tsxindex 084cf0df881..cb41f228889 100644--- a/src/app/[variants]/(main)/discover/(list)/assistant/features/Category/index.tsx+++ b/src/app/[variants]/(main)/discover/(list)/assistant/features/Category/index.tsx@@ -16,15 +16,19 @@ import { useCategory } from './useCategory';const Category = memo(() => {const useAssistantCategories = useDiscoverStore((s) => s.useAssistantCategories);- const { category = 'all', q } = useQuery() as { category?: AssistantCategory; q?: string };- const { data: items = [] } = useAssistantCategories({ q });+ const {+ category = 'all',+ q,+ source,+ } = useQuery() as { category?: AssistantCategory; q?: string; source?: string };+ const { data: items = [] } = useAssistantCategories({ q, source: source as any });const navigate = useNavigate();const cates = useCategory();const genUrl = (key: AssistantCategory) =>qs.stringifyUrl({- query: { category: key === AssistantCategory.All ? null : key, q },+ query: { category: key === AssistantCategory.All ? null : key, q, source },url: '/assistant',},{ skipNull: true },diff --git a/src/app/[variants]/(main)/discover/(list)/assistant/features/List/Item.tsx b/src/app/[variants]/(main)/discover/(list)/assistant/features/List/Item.tsxindex 4320fa2b6da..0867d42d70e 100644--- a/src/app/[variants]/(main)/discover/(list)/assistant/features/List/Item.tsx+++ b/src/app/[variants]/(main)/discover/(list)/assistant/features/List/Item.tsx@@ -2,6 +2,7 @@ import { Github } from '@lobehub/icons';import { ActionIcon, Avatar, Block, Icon, Text } from '@lobehub/ui';import { createStyles } from 'antd-style';import { ClockIcon } from 'lucide-react';+import qs from 'query-string';import { memo } from 'react';import { useTranslation } from 'react-i18next';import { Flexbox } from 'react-layout-kit';@@ -9,7 +10,8 @@ import { Link, useNavigate } from 'react-router-dom';import urlJoin from 'url-join';import PublishedTime from '@/components/PublishedTime';-import { DiscoverAssistantItem } from '@/types/discover';+import { useQuery } from '@/hooks/useQuery';+import { AssistantMarketSource, DiscoverAssistantItem } from '@/types/discover';import TokenTag from './TokenTag';@@ -61,9 +63,18 @@ const AssistantItem = memo<DiscoverAssistantItem>(knowledgeCount,backgroundColor,}) => {++ console.log("author",author)const { styles, theme } = useStyles();const navigate = useNavigate();- const link = urlJoin('/assistant', identifier);+ const { source } = useQuery() as { source?: AssistantMarketSource };+ const link = qs.stringifyUrl(+ {+ query: { source },+ url: urlJoin('/assistant', identifier),+ },+ { skipNull: true },+ );const { t } = useTranslation('discover');return (diff --git a/src/app/[variants]/(main)/discover/(list)/assistant/features/MarketSourceSwitch.tsx b/src/app/[variants]/(main)/discover/(list)/assistant/features/MarketSourceSwitch.tsxnew file mode 100644index 00000000000..ba3af93fe8b--- /dev/null+++ b/src/app/[variants]/(main)/discover/(list)/assistant/features/MarketSourceSwitch.tsx@@ -0,0 +1,64 @@+'use client';++import { Dropdown, DropdownMenuItemType, Icon } from '@lobehub/ui';+import { Button } from 'antd';+import { ChevronDown, Store } from 'lucide-react';+import { memo, useMemo } from 'react';+import { useTranslation } from 'react-i18next';++import { useQuery } from '@/hooks/useQuery';+import { useQueryRoute } from '@/hooks/useQueryRoute';+import { AssistantMarketSource } from '@/types/discover';++const MarketSourceSwitch = memo(() => {+ const { t } = useTranslation('discover');+ const router = useQueryRoute();+ const query = useQuery() as { source?: AssistantMarketSource };+ const currentSource = (query.source as AssistantMarketSource) ?? 'new';++ const items = useMemo(+ () =>+ [+ {+ key: 'new',+ label: t('assistants.marketSource.new'),+ },+ {+ key: 'legacy',+ label: t('assistants.marketSource.legacy'),+ },+ ] satisfies DropdownMenuItemType[],+ [t],+ );++ const handleChange = (value: AssistantMarketSource) => {+ router.push('/discover/assistant', {+ query: {+ page: null,+ source: value === 'new' ? null : value,+ },+ });+ };++ return (+ <Dropdown+ menu={{+ // @ts-expect-error 等待 antd 修复+ activeKey: currentSource,+ items,+ onClick: ({ key }) => handleChange(key as AssistantMarketSource),+ }}+ trigger={['click', 'hover']}+ >+ <Button icon={<Icon icon={Store} />} type={'text'}>+ {t('assistants.marketSource.label')}:{' '}+ {items.find((item) => item.key === currentSource)?.label}+ <Icon icon={ChevronDown} />+ </Button>+ </Dropdown>+ );+});++MarketSourceSwitch.displayName = 'MarketSourceSwitch';++export default MarketSourceSwitch;diff --git a/src/app/[variants]/(main)/discover/(list)/features/SortButton/index.tsx b/src/app/[variants]/(main)/discover/(list)/features/SortButton/index.tsxindex acd3e4e1c82..15930f73939 100644--- a/src/app/[variants]/(main)/discover/(list)/features/SortButton/index.tsx+++ b/src/app/[variants]/(main)/discover/(list)/features/SortButton/index.tsx@@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next';import { useQuery } from '@/hooks/useQuery';import { useQueryRoute } from '@/hooks/useQueryRoute';+import { useMarketAuth } from '@/layout/AuthProvider/MarketAuth';import {AssistantSorts,DiscoverTab,@@ -21,11 +22,12 @@ const SortButton = memo(() => {const pathname = usePathname();const { sort } = useQuery();const router = useQueryRoute();+ const { isAuthenticated, getCurrentUserInfo } = useMarketAuth();const activeTab = useMemo(() => pathname.split('discover/')[1] as DiscoverTab, [pathname]);const items = useMemo(() => {switch (activeTab) {case DiscoverTab.Assistants: {- return [+ const baseItems = [{key: AssistantSorts.CreatedAt,label: t('assistants.sorts.createdAt'),@@ -51,6 +53,16 @@ const SortButton = memo(() => {label: t('assistants.sorts.knowledgeCount'),},];++ // Only add "My Own" option if user is authenticated+ if (isAuthenticated) {+ baseItems.push({+ key: AssistantSorts.MyOwn,+ label: t('assistants.sorts.myown'),+ });+ }++ return baseItems;}case DiscoverTab.Plugins: {return [@@ -144,7 +156,7 @@ const SortButton = memo(() => {return [];}}- }, [t, activeTab]);+ }, [t, activeTab, isAuthenticated]);const activeItem: any = useMemo(() => {if (sort) {@@ -155,11 +167,18 @@ const SortButton = memo(() => {}, [items, sort]);const handleSort = (config: string) => {- router.push(pathname, {- query: {- sort: config,- },- });+ const query: any = { sort: config };++ // If "My Own" is selected, add ownerId to query+ if (config === AssistantSorts.MyOwn) {+ const userInfo = getCurrentUserInfo();+ console.log('userInfo', userInfo);+ if (userInfo?.accountId) {+ query.ownerId = userInfo.accountId;+ }+ }++ router.push(pathname, { query });};if (items?.length === 0) return null;diff --git a/src/app/[variants]/(main)/profile/_layout/Desktop/index.tsx b/src/app/[variants]/(main)/profile/_layout/Desktop/index.tsxindex b9c73ce957d..fc57b5ef9a4 100644--- a/src/app/[variants]/(main)/profile/_layout/Desktop/index.tsx+++ b/src/app/[variants]/(main)/profile/_layout/Desktop/index.tsx@@ -34,16 +34,16 @@ const Layout = memo<LayoutProps>(({ children, category }) => {{category}</Header>)}- <SettingContainer- addonAfter={<Footer />}- style={{- paddingBlock: 24,- paddingInline: 32,- }}- >- {children}- </SettingContainer>- </Flexbox>+ <SettingContainer+ addonAfter={<Footer />}+ style={{+ paddingBlock: 24,+ paddingInline: 32,+ }}+ >+ {children}+ </SettingContainer>+ </Flexbox>);});diff --git a/src/app/[variants]/(main)/settings/_layout/type.ts b/src/app/[variants]/(main)/settings/_layout/type.tsindex b77f95adda5..002a63ad298 100644--- a/src/app/[variants]/(main)/settings/_layout/type.ts+++ b/src/app/[variants]/(main)/settings/_layout/type.ts@@ -2,5 +2,5 @@ import { ReactNode } from 'react';export interface LayoutProps {children?: ReactNode;- showLLM?: boolean+ showLLM?: boolean;}diff --git a/src/app/[variants]/(main)/settings/agent/index.tsx b/src/app/[variants]/(main)/settings/agent/index.tsxindex 75ac2c8239a..b8a832738e0 100644--- a/src/app/[variants]/(main)/settings/agent/index.tsx+++ b/src/app/[variants]/(main)/settings/agent/index.tsx@@ -13,15 +13,16 @@ import { useCategory } from '@/features/AgentSetting/AgentCategory/useCategory';import { ChatSettingsTabs } from '@/store/global/initialState';import { useUserStore } from '@/store/user';import { settingsSelectors } from '@/store/user/selectors';-import DesktopLayout from './_layout/Desktop'-import MobileLayout from './_layout/Mobile'++import DesktopLayout from './_layout/Desktop';+import MobileLayout from './_layout/Mobile';type AgentPageType = {mobile?: boolean;-}+};const Page = memo((props: AgentPageType) => {- const { mobile } = props+ const { mobile } = props;const cateItems = useCategory();const [tab, setTab] = useQueryState('tab', {defaultValue: ChatSettingsTabs.Prompt,@@ -37,7 +38,6 @@ const Page = memo((props: AgentPageType) => {if (!isUserStateInit) return <Skeleton active paragraph={{ rows: 5 }} title={false} />;-const PageContent = (<>{mobile && (@@ -65,12 +65,13 @@ const Page = memo((props: AgentPageType) => {tab={tab as ChatSettingsTabs}/></>- )+ );- return mobile ? <MobileLayout>- {PageContent}- </MobileLayout> : <DesktopLayout>- {PageContent}</DesktopLayout>;+ return mobile ? (+ <MobileLayout>{PageContent}</MobileLayout>+ ) : (+ <DesktopLayout>{PageContent}</DesktopLayout>+ );});Page.displayName = 'AgentSetting';diff --git a/src/app/[variants]/(main)/settings/common/index.tsx b/src/app/[variants]/(main)/settings/common/index.tsxindex ee691afebc3..5467acb5bfc 100644--- a/src/app/[variants]/(main)/settings/common/index.tsx+++ b/src/app/[variants]/(main)/settings/common/index.tsx@@ -5,7 +5,7 @@ import Common from './features/Common/Common';const Page = () => {return (<>- <Common/>+ <Common /><Appearance /><ChatAppearance /></>diff --git a/src/app/[variants]/(main)/settings/page.tsx b/src/app/[variants]/(main)/settings/page.tsxindex d5c652075ea..8a6e94d418a 100644--- a/src/app/[variants]/(main)/settings/page.tsx+++ b/src/app/[variants]/(main)/settings/page.tsx@@ -1,16 +1,15 @@import ServerLayout from '@/components/server/ServerLayout';+import { serverFeatureFlags } from '@/config/featureFlags';import { metadataModule } from '@/server/metadata';import { translation } from '@/server/translation';import { DynamicLayoutProps } from '@/types/next';import { RouteVariants } from '@/utils/server/routeVariants';+import SettingsContextProvider from './_layout/ContextProvider';import Desktop from './_layout/Desktop';import Mobile from './_layout/Mobile';import { LayoutProps } from './_layout/type';-import { serverFeatureFlags } from '@/config/featureFlags';-import SettingsContextProvider from './_layout/ContextProvider';-export const generateMetadata = async (props: DynamicLayoutProps) => {const locale = await RouteVariants.getLocale(props);const { t } = await translation('setting', locale);@@ -21,19 +20,23 @@ export const generateMetadata = async (props: DynamicLayoutProps) => {});};-const SettingsLayout = ServerLayout<LayoutProps & {- showLLM?: boolean-}>({ Desktop, Mobile });+const SettingsLayout = ServerLayout<+ LayoutProps & {+ showLLM?: boolean;+ }+>({ Desktop, Mobile });const SettingsPage = async (props: DynamicLayoutProps) => {const showLLM = serverFeatureFlags().showProvider;const { showOpenAIProxyUrl, showOpenAIApiKey } = serverFeatureFlags();return (- <SettingsContextProvider value={{- showOpenAIApiKey: showOpenAIApiKey,- showOpenAIProxyUrl: showOpenAIProxyUrl- }}>+ <SettingsContextProvider+ value={{+ showOpenAIApiKey: showOpenAIApiKey,+ showOpenAIProxyUrl: showOpenAIProxyUrl,+ }}+ ><SettingsLayout {...props} showLLM={showLLM} /></SettingsContextProvider>);diff --git a/src/app/[variants]/(main)/settings/provider/ProviderMenu/Item.tsx b/src/app/[variants]/(main)/settings/provider/ProviderMenu/Item.tsxindex 94beba3fe63..c74cbf79f81 100644--- a/src/app/[variants]/(main)/settings/provider/ProviderMenu/Item.tsx+++ b/src/app/[variants]/(main)/settings/provider/ProviderMenu/Item.tsx@@ -44,42 +44,41 @@ const ProviderItem = memo<ProviderItemProps>(const { styles, cx } = useStyles();const searchParams = useSearchParams();- const activeKey = searchParams.get('provider');+ const activeKey = searchParams.get('provider');- const isCustom = source === AiProviderSourceEnum.Custom;- return (- <div- className={cx(styles.container, activeKey === id && styles.active)}- onClick={() => {- onClick(id);- }}- >- <Flexbox gap={8} horizontal>- {isCustom && logo ? (- <Avatar- alt={name || id}- avatar={logo}- shape={'square'}- size={24}- style={{ borderRadius: 6 }}- />- ) : (- <ProviderIcon provider={id} size={24} style={{ borderRadius: 6 }} type={'avatar'} />- )}- {name}- </Flexbox>- <Flexbox horizontal>- {enabled && (- <Center width={24}>- <Badge status="success" />- </Center>- )}- {/* cloud slot */}+ const isCustom = source === AiProviderSourceEnum.Custom;+ return (+ <div+ className={cx(styles.container, activeKey === id && styles.active)}+ onClick={() => {+ onClick(id);+ }}+ >+ <Flexbox gap={8} horizontal>+ {isCustom && logo ? (+ <Avatar+ alt={name || id}+ avatar={logo}+ shape={'square'}+ size={24}+ style={{ borderRadius: 6 }}+ />+ ) : (+ <ProviderIcon provider={id} size={24} style={{ borderRadius: 6 }} type={'avatar'} />+ )}+ {name}+ </Flexbox>+ <Flexbox horizontal>+ {enabled && (+ <Center width={24}>+ <Badge status="success" />+ </Center>+ )}+ {/* cloud slot */}- {/* cloud slot */}- </Flexbox>- </div>- );- },-);+ {/* cloud slot */}+ </Flexbox>+ </div>+ );+});export default ProviderItem;diff --git a/src/app/[variants]/(main)/settings/provider/ProviderMenu/SearchResult.tsx b/src/app/[variants]/(main)/settings/provider/ProviderMenu/SearchResult.tsxindex 9f9ee088aca..1e8e3500e5f 100644--- a/src/app/[variants]/(main)/settings/provider/ProviderMenu/SearchResult.tsx+++ b/src/app/[variants]/(main)/settings/provider/ProviderMenu/SearchResult.tsx@@ -9,10 +9,8 @@ import { useAiInfraStore } from '@/store/aiInfra';import ProviderItem from './Item';-const SearchResult = memo((props:{- onProviderSelect?: (key: string)=>void-}) => {- const {onProviderSelect =()=>{} } = props+const SearchResult = memo((props: { onProviderSelect?: (key: string) => void }) => {+ const { onProviderSelect = () => {} } = props;const { t } = useTranslation('modelProvider');const searchKeyword = useAiInfraStore((s) => s.providerSearchKeyword);@@ -37,7 +35,9 @@ const SearchResult = memo((props:{{t('menu.notFound')}</Flexbox>) : (- filteredProviders.map((item) => <ProviderItem {...item} key={item.id} onClick={onProviderSelect} />)+ filteredProviders.map((item) => (+ <ProviderItem {...item} key={item.id} onClick={onProviderSelect} />+ )))}</Flexbox>);diff --git a/src/app/[variants]/(main)/settings/provider/_layout/Desktop/Container.tsx b/src/app/[variants]/(main)/settings/provider/_layout/Desktop/Container.tsxindex 4b78553dd2a..af74d2cd2e3 100644--- a/src/app/[variants]/(main)/settings/provider/_layout/Desktop/Container.tsx+++ b/src/app/[variants]/(main)/settings/provider/_layout/Desktop/Container.tsx@@ -5,9 +5,15 @@ import { PropsWithChildren, memo } from 'react';import SettingContainer from '@/features/Setting/SettingContainer';const Container = memo<PropsWithChildren>(({ children }) => {- return <SettingContainer style={{- paddingBlock: 24,- paddingInline: 32- }}>{children}</SettingContainer>;+ return (+ <SettingContainer+ style={{+ paddingBlock: 24,+ paddingInline: 32,+ }}+ >+ {children}+ </SettingContainer>+ );});export default Container;diff --git a/src/app/market-auth-callback/layout.tsx b/src/app/market-auth-callback/layout.tsxnew file mode 100644index 00000000000..7d1654e4059--- /dev/null+++ b/src/app/market-auth-callback/layout.tsx@@ -0,0 +1,15 @@+import { ReactNode } from 'react';++interface RootLayoutProps {+ children: ReactNode;+}++const RootLayout = ({ children }: RootLayoutProps) => {+ return (+ <html lang="en" suppressHydrationWarning>+ <body>{children}</body>+ </html>+ );+};++export default RootLayout;diff --git a/src/app/market-auth-callback/page.tsx b/src/app/market-auth-callback/page.tsxnew file mode 100644index 00000000000..c926fc95e30--- /dev/null+++ b/src/app/market-auth-callback/page.tsx@@ -0,0 +1,196 @@+'use client';++import { Icon } from '@lobehub/ui';+import { Card, Result } from 'antd';+import { CheckCircle, Clock, ShieldX } from 'lucide-react';+import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';+import { Center } from 'react-layout-kit';++type CallbackStatus = 'loading' | 'success' | 'error';++/**+ * Market OIDC 授权回调页面+ * 处理从 OIDC 服务器返回的授权码+ */+const MarketAuthCallbackPage = () => {+ const { t } = useTranslation('marketAuth');+ const [status, setStatus] = useState<CallbackStatus>('loading');+ const [message, setMessage] = useState('');+ const [countdown, setCountdown] = useState(3);++ useEffect(() => {+ console.log('[MarketAuthCallback] Processing authorization callback');++ const urlParams = new URLSearchParams(window.location.search);+ const code = urlParams.get('code');+ const state = urlParams.get('state');+ const error = urlParams.get('error');+ const errorDescription = urlParams.get('error_description');++ if (error) {+ console.error('[MarketAuthCallback] Authorization error:', error, errorDescription);+ setStatus('error');+ setMessage(t('callback.messages.authFailed', { error: errorDescription || error }));++ // 向父窗口发送错误消息+ if (window.opener) {+ window.opener.postMessage(+ {+ error: errorDescription || error,+ type: 'MARKET_AUTH_ERROR',+ },+ window.location.origin,+ );+ }+ return;+ }++ if (code && state) {+ console.log('[MarketAuthCallback] Authorization successful, code received');+ setStatus('success');+ setMessage(t('callback.messages.successWithRedirect'));++ // 向父窗口发送成功消息+ if (window.opener) {+ window.opener.postMessage(+ {+ code,+ state,+ type: 'MARKET_AUTH_SUCCESS',+ },+ window.location.origin,+ );+ }++ // 开始倒计时并在3秒后关闭窗口+ let timeLeft = 3;+ setCountdown(timeLeft);++ const countdownTimer = setInterval(() => {+ timeLeft -= 1;+ setCountdown(timeLeft);++ if (timeLeft <= 0) {+ clearInterval(countdownTimer);+ window.close();+ }+ }, 1000);+ } else {+ console.error('[MarketAuthCallback] Missing code or state parameter');+ setStatus('error');+ setMessage(t('callback.messages.missingParams'));++ if (window.opener) {+ window.opener.postMessage(+ {+ error: 'Missing authorization parameters',+ type: 'MARKET_AUTH_ERROR',+ },+ window.location.origin,+ );+ }+ }+ }, [t]);++ const getStatusIcon = () => {+ switch (status) {+ case 'success': {+ return <Icon icon={CheckCircle} />;+ }+ case 'error': {+ return <Icon icon={ShieldX} />;+ }+ default: {+ return <Icon icon={Clock} />;+ }+ }+ };++ const getResultStatus = () => {+ switch (status) {+ case 'success': {+ return 'success';+ }+ case 'error': {+ return 'error';+ }+ default: {+ return 'info';+ }+ }+ };++ const getTitle = () => {+ switch (status) {+ case 'loading': {+ return t('callback.titles.loading');+ }+ case 'success': {+ return t('callback.titles.success');+ }+ case 'error': {+ return t('callback.titles.error');+ }+ }+ };++ const getSubTitle = () => {+ if (status === 'loading') {+ return t('callback.messages.processing');+ }+ if (status === 'success') {+ return t('callback.messages.successWithCountdown', { countdown, message });+ }+ return message;+ };++ const getExtra = () => {+ if (status === 'error') {+ return (+ <button+ onClick={() => window.close()}+ style={{+ backgroundColor: '#ff4d4f',+ border: 'none',+ borderRadius: '6px',+ color: 'white',+ cursor: 'pointer',+ fontSize: '14px',+ padding: '8px 16px',+ }}+ type="button"+ >+ {t('callback.buttons.close')}+ </button>+ );+ }+ return undefined;+ };++ return (+ <Center height="100vh">+ <Card+ style={{+ alignItems: 'center',+ display: 'flex',+ justifyContent: 'center',+ minHeight: 280,+ minWidth: 500,+ width: '100%',+ }}+ >+ <Result+ extra={getExtra()}+ icon={getStatusIcon()}+ status={getResultStatus()}+ style={{ padding: 0 }}+ subTitle={getSubTitle()}+ title={getTitle()}+ />+ </Card>+ </Center>+ );+};++export default MarketAuthCallbackPage;diff --git a/src/features/AgentSetting/AgentPrompt/TokenTag.tsx b/src/features/AgentSetting/AgentPrompt/TokenTag.tsxindex cef1d3588c1..aa94c19e1f9 100644--- a/src/features/AgentSetting/AgentPrompt/TokenTag.tsx+++ b/src/features/AgentSetting/AgentPrompt/TokenTag.tsx@@ -1,9 +1,9 @@import { Tag } from '@lobehub/ui';-import { memo } from 'react';+import React, { memo } from 'react';import { useTokenCount } from '@/hooks/useTokenCount';-const Tokens = memo<{ value: string }>(({ value }) => {+const Tokens = memo<{ style?: React.CSSProperties, value: string; }>(({ value, style }) => {const systemTokenCount = useTokenCount(value);if (!value || !systemTokenCount) return;@@ -12,6 +12,7 @@ const Tokens = memo<{ value: string }>(({ value }) => {style={{marginTop: 24,width: 'fit-content',+ ...style,}}>Token: {systemTokenCount}diff --git a/src/features/PluginTag/PluginStatus.tsx b/src/features/PluginTag/PluginStatus.tsxindex 7648bc09a11..8911c856fd5 100644--- a/src/features/PluginTag/PluginStatus.tsx+++ b/src/features/PluginTag/PluginStatus.tsx@@ -54,7 +54,7 @@ const PluginStatus = memo<PluginStatusProps>(({ title, id, deprecated }) => {}, [status]);const tag =- // 废弃标签+ // 拒绝标签deprecated ? (<Tag bordered={false} color={'red'} style={{ marginRight: 0 }}>{t('list.item.deprecated.title', { ns: 'plugin' })}diff --git a/src/hooks/useAgentOwnershipCheck.ts b/src/hooks/useAgentOwnershipCheck.tsnew file mode 100644index 00000000000..3d6fe57e9c1--- /dev/null+++ b/src/hooks/useAgentOwnershipCheck.ts@@ -0,0 +1,143 @@+import { useEffect, useState } from 'react';++import { useMarketAuth } from '@/layout/AuthProvider/MarketAuth';+import { MarketAuthContextType } from '@/layout/AuthProvider/MarketAuth/types';+import { marketApiService } from '@/services/marketApi';++interface AgentOwnershipResult {+ // null = loading, true = 是用户的, false = 不是用户的+ error?: string;+ isOwnAgent: boolean | null;+}++// 简单的缓存机制避免重复 API 调用+const agentOwnershipCache = new Map<string, { result: boolean; timestamp: number }>();+const CACHE_DURATION = 5 * 60 * 1000; // 5分钟缓存++const buildCacheKey = (marketIdentifier: string, accountId?: string | number | null) =>+ `${marketIdentifier}::${accountId ?? 'unknown'}`;++/**+ * 获取当前用户 ID+ */+function getCurrentAccountId(marketAuth: MarketAuthContextType): string | number | null {+ try {+ // 首先尝试从 marketAuth 中获取用户信息+ const userInfo = marketAuth.getCurrentUserInfo?.();+ if (userInfo?.accountId !== null) {+ console.log('[useAgentOwnershipCheck] User ID from userInfo:', userInfo?.accountId);+ return userInfo?.accountId ?? null;+ }++ // 如果没有,尝试从 sessionStorage 中获取+ const userInfoData = sessionStorage.getItem('market_user_info');+ if (userInfoData) {+ const parsedUserInfo = JSON.parse(userInfoData);+ console.log(+ '[useAgentOwnershipCheck] User ID from sessionStorage:',+ parsedUserInfo.accountId,+ );+ return parsedUserInfo.accountId ?? parsedUserInfo.sub ?? null;+ }++ console.warn('[useAgentOwnershipCheck] No user ID found');+ return null;+ } catch (error) {+ console.error('[useAgentOwnershipCheck] Failed to get current user ID:', error);+ return null;+ }+}++interface CheckOwnershipParams {+ accessToken?: string;+ accountId?: string | number | null;+ marketIdentifier?: string;+ skipCache?: boolean;+}++/**+ * 校验当前账号是否为指定 agent 的 owner+ */+export const checkOwnership = async ({+ accountId,+ accessToken,+ marketIdentifier,+ skipCache = false,+}: CheckOwnershipParams): Promise<boolean> => {+ if (!marketIdentifier || !accountId || !accessToken) {+ console.warn('[checkOwnership] Missing required parameters', {+ accessToken: Boolean(accessToken),+ accountId,+ marketIdentifier,+ });+ return false;+ }++ const cacheKey = buildCacheKey(marketIdentifier, accountId);+ const cached = agentOwnershipCache.get(cacheKey);+ if (!skipCache && cached && Date.now() - cached.timestamp < CACHE_DURATION) {+ console.log('[checkOwnership] Using cached result:', cached.result);+ return cached.result;+ }++ marketApiService.setAccessToken(accessToken);+ const agentDetail = await marketApiService.getAgentDetail(marketIdentifier);+ console.log('[checkOwnership] Agent detail:', agentDetail);++ const isOwner = `${agentDetail?.ownerId ?? ''}` === `${accountId}`;+ agentOwnershipCache.set(cacheKey, {+ result: isOwner,+ timestamp: Date.now(),+ });++ return isOwner;+};++/**+ * 检查当前用户是否拥有指定的 agent+ */+export const useAgentOwnershipCheck = (marketIdentifier?: string): AgentOwnershipResult => {+ const [result, setResult] = useState<AgentOwnershipResult>({ isOwnAgent: null });+ const marketAuth = useMarketAuth();+ const { session, isAuthenticated } = marketAuth;++ useEffect(() => {+ if (!marketIdentifier || !isAuthenticated || !session) {+ setResult({ isOwnAgent: false });+ return;+ }++ const runOwnershipCheck = async () => {+ try {+ console.log('[useAgentOwnershipCheck] Checking ownership for:', marketIdentifier);++ // 获取当前用户 ID+ const currentAccountId = getCurrentAccountId(marketAuth);+ console.log('[useAgentOwnershipCheck] Current user ID:', currentAccountId);++ if (!currentAccountId) {+ console.warn('[useAgentOwnershipCheck] Could not get current user ID');+ setResult({ isOwnAgent: false });+ return;+ }++ const isOwner = await checkOwnership({+ accessToken: session.accessToken,+ accountId: currentAccountId,+ marketIdentifier,+ });++ setResult({ isOwnAgent: isOwner });+ } catch (error) {+ setResult({+ error: error instanceof Error ? error.message : 'Unknown error',+ isOwnAgent: false,+ });+ }+ };++ runOwnershipCheck();+ }, [marketIdentifier, isAuthenticated, session, marketAuth]);++ return result;+};diff --git a/src/instrumentation.node.ts b/src/instrumentation.node.tsindex a1d06c30621..e07bb5f1120 100644--- a/src/instrumentation.node.ts+++ b/src/instrumentation.node.ts@@ -1,4 +1,5 @@-import { register } from '@lobechat/observability-otel/node'+import { register } from '@lobechat/observability-otel/node';+import { version } from '../package.json';-register({ version })+register({ version });diff --git a/src/layout/AuthProvider/MarketAuth/MarketAuthProvider.tsx b/src/layout/AuthProvider/MarketAuth/MarketAuthProvider.tsxnew file mode 100644index 00000000000..6ad2cd4c3ec--- /dev/null+++ b/src/layout/AuthProvider/MarketAuth/MarketAuthProvider.tsx@@ -0,0 +1,364 @@+'use client';++import { ReactNode, createContext, useContext, useEffect, useState } from 'react';++import { MARKET_OIDC_ENDPOINTS } from '@/services/_url';++import { MarketAuthError } from './errors';+import { MarketOIDC } from './oidc';+import { MarketAuthContextType, MarketAuthSession, MarketUserInfo, OIDCConfig } from './types';++const MarketAuthContext = createContext<MarketAuthContextType | null>(null);++interface MarketAuthProviderProps {+ children: ReactNode;+ isDesktop: boolean;+}++/**+ * 从 cookie 中获取 token+ */+const getTokenFromCookie = (): string | null => {+ if (typeof document === 'undefined') return null;++ // eslint-disable-next-line unicorn/no-document-cookie+ const cookies = document.cookie.split(';');+ for (const cookie of cookies) {+ const [name, value] = cookie.trim().split('=');+ if (name === 'market-bearertoken') {+ console.log('[MarketAuth] Found market token in cookie');+ return value;+ }+ }+ return null;+};++/**+ * 将 token 存储到 cookie+ */+const setTokenToCookie = (token: string, expiresIn: number) => {+ console.log('[MarketAuth] Storing token to cookie');+ const expiresAt = new Date(Date.now() + expiresIn * 1000);+ // eslint-disable-next-line unicorn/no-document-cookie+ document.cookie = `market-bearertoken=${token}; expires=${expiresAt.toUTCString()}; path=/; secure; samesite=strict`;+};++/**+ * 从 cookie 中删除 token+ */+const removeTokenFromCookie = () => {+ console.log('[MarketAuth] Removing token from cookie');+ // eslint-disable-next-line unicorn/no-document-cookie+ document.cookie = 'market-bearertoken=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';+};++/**+ * 获取用户信息+ */+const fetchUserInfo = async (accessToken: string): Promise<MarketUserInfo | null> => {+ try {+ const response = await fetch(MARKET_OIDC_ENDPOINTS.userinfo, {+ body: JSON.stringify({ token: accessToken }),+ headers: {+ 'Content-Type': 'application/json',+ },+ method: 'POST',+ });++ console.log('[MarketAuth] User info response:', response);++ if (!response.ok) {+ console.error(+ '[MarketAuth] Failed to fetch user info:',+ response.status,+ response.statusText,+ );+ return null;+ }++ const userInfo = (await response.json()) as MarketUserInfo;+ console.log('[MarketAuth] User info fetched successfully:', userInfo);++ return userInfo;+ } catch (error) {+ console.error('[MarketAuth] Error fetching user info:', error);+ return null;+ }+};++/**+ * 刷新令牌(暂时简化,后续可以实现 refresh token 逻辑)+ */+const refreshToken = async (): Promise<boolean> => {+ console.log('[MarketAuth] Refresh token not implemented yet');+ return false;+};++/**+ * Market 授权上下文提供者+ */+export const MarketAuthProvider = ({ children, isDesktop }: MarketAuthProviderProps) => {+ const [session, setSession] = useState<MarketAuthSession | null>(null);+ const [status, setStatus] = useState<'loading' | 'authenticated' | 'unauthenticated'>('loading');+ const [oidcClient, setOidcClient] = useState<MarketOIDC | null>(null);+ const [shouldReauthorize, setShouldReauthorize] = useState(false);++ // 初始化 OIDC 客户端(仅在客户端)+ useEffect(() => {+ if (typeof window !== 'undefined') {+ const baseUrl = process.env.NEXT_PUBLIC_MARKET_BASE_URL || 'http://127.0.0.1:8787';+ const desktopRedirectUri = new URL(MARKET_OIDC_ENDPOINTS.desktopCallback, baseUrl).toString();++ // 桌面端使用 Market 手动维护的 Web 回调,Web 端使用当前域名+ const redirectUri = isDesktop+ ? desktopRedirectUri+ : `${window.location.origin}/market-auth-callback`;++ const oidcConfig: OIDCConfig = {+ baseUrl,+ clientId: isDesktop ? 'lobehub-desktop' : 'lobechat-com',+ redirectUri,+ scope: 'openid profile email',+ };+ setOidcClient(new MarketOIDC(oidcConfig));+ }+ }, [isDesktop]);++ /**+ * 检查并恢复会话+ */+ const restoreSession = () => {+ console.log('[MarketAuth] Attempting to restore session');+ const token = getTokenFromCookie();++ if (token) {+ // 从 sessionStorage 中获取完整的会话信息+ const sessionData = sessionStorage.getItem('market_auth_session');+ if (sessionData) {+ try {+ const parsedSession = JSON.parse(sessionData) as MarketAuthSession;++ // 检查 token 是否过期+ if (parsedSession.expiresAt > Date.now()) {+ console.log('[MarketAuth] Session restored from storage');++ console.log('parsedSession', parsedSession);+ console.log('parsedSession.userInfo', parsedSession.userInfo);+ console.log(+ "sessionStorage.getItem('market_user_info')",+ sessionStorage.getItem('market_user_info'),+ );++ // 如果 session 中没有 userInfo,尝试从单独的存储中获取+ if (!parsedSession.userInfo) {+ const userInfoData = sessionStorage.getItem('market_user_info');+ if (userInfoData) {+ try {+ parsedSession.userInfo = JSON.parse(userInfoData);+ } catch (error) {+ console.error('[MarketAuth] Failed to parse stored user info:', error);+ }+ } else {+ setShouldReauthorize(true);+ }+ }++ setSession(parsedSession);+ setStatus('authenticated');+ return;+ } else {+ console.log('[MarketAuth] Stored session has expired, will trigger re-authorization');+ sessionStorage.removeItem('market_auth_session');+ removeTokenFromCookie();+ // 标记需要重新授权,等待 oidcClient 准备好+ setShouldReauthorize(true);+ return;+ }+ } catch (error) {+ console.error('[MarketAuth] Failed to parse stored session:', error);+ sessionStorage.removeItem('market_auth_session');+ removeTokenFromCookie();+ }+ }+ }++ console.log('[MarketAuth] No valid session found');+ setStatus('unauthenticated');+ };++ /**+ * 登录方法+ */+ const signIn = async (): Promise<number | null> => {+ console.log('[MarketAuth] Starting sign in process');++ if (!oidcClient) {+ console.error('[MarketAuth] OIDC client not initialized');+ throw new MarketAuthError('oidcNotReady', { message: 'OIDC client not initialized' });+ }++ try {+ setStatus('loading');++ // 启动 OIDC 授权流程并获取授权码+ const authResult = await oidcClient.startAuthorization();+ console.log('[MarketAuth] Authorization successful, exchanging code for token', authResult);++ // 用授权码换取访问令牌+ const tokenResponse = await oidcClient.exchangeCodeForToken(+ authResult.code,+ authResult.state,+ );++ console.log('[MarketAuth] Token response:', tokenResponse);++ // 获取用户信息+ const userInfo = await fetchUserInfo(tokenResponse.accessToken);++ // 创建会话对象+ const newSession: MarketAuthSession = {+ accessToken: tokenResponse.accessToken,+ expiresAt: Date.now() + tokenResponse.expiresIn * 1000,+ expiresIn: tokenResponse.expiresIn,+ scope: tokenResponse.scope,+ tokenType: tokenResponse.tokenType as 'Bearer',+ userInfo: userInfo || undefined,+ };++ // 存储 token 到 cookie 和 sessionStorage+ setTokenToCookie(tokenResponse.accessToken, tokenResponse.expiresIn);+ sessionStorage.setItem('market_auth_session', JSON.stringify(newSession));++ // 单独存储用户信息到 sessionStorage 供其他地方使用+ if (userInfo) {+ sessionStorage.setItem('market_user_info', JSON.stringify(userInfo));+ }++ setSession(newSession);+ setStatus('authenticated');++ console.log('[MarketAuth] Sign in completed successfully');+ return userInfo?.accountId ?? null;+ } catch (error) {+ console.error('[MarketAuth] Sign in failed:', error);+ setStatus('unauthenticated');+ throw error;+ }+ };++ /**+ * 登出方法+ */+ const signOut = () => {+ setSession(null);+ setStatus('unauthenticated');+ removeTokenFromCookie();+ sessionStorage.removeItem('market_auth_session');+ sessionStorage.removeItem('market_user_info');+ };++ /**+ * 获取当前用户信息+ */+ const getCurrentUserInfo = (): MarketUserInfo | null => {+ console.log('getCurrentUserInfo-session', session, session?.userInfo);+ if (session?.userInfo) {+ return session.userInfo;+ }++ // 如果 session 中没有,尝试从 sessionStorage 中获取+ try {+ const userInfoData = sessionStorage.getItem('market_user_info');+ if (userInfoData) {+ return JSON.parse(userInfoData) as MarketUserInfo;+ }+ } catch (error) {+ console.error('[MarketAuth] Failed to get user info from storage:', error);+ }++ return null;+ };++ /**+ * 初始化时恢复会话+ */+ useEffect(() => {+ restoreSession();+ }, []);++ /**+ * 当需要重新授权且 OIDC 客户端准备好时,自动触发重新授权+ */+ useEffect(() => {+ const handleAutoReauthorization = async () => {+ if (shouldReauthorize && oidcClient) {+ setShouldReauthorize(false); // 重置标识,避免重复触发+ try {+ setStatus('loading');+ // 启动 OIDC 授权流程并获取授权码+ const authResult = await oidcClient.startAuthorization();+ // 用授权码换取访问令牌+ const tokenResponse = await oidcClient.exchangeCodeForToken(+ authResult.code,+ authResult.state,+ );++ // 获取用户信息+ const userInfo = await fetchUserInfo(tokenResponse.accessToken);+ // 创建会话对象+ const newSession: MarketAuthSession = {+ accessToken: tokenResponse.accessToken,+ expiresAt: Date.now() + tokenResponse.expiresIn * 1000,+ expiresIn: tokenResponse.expiresIn,+ scope: tokenResponse.scope,+ tokenType: tokenResponse.tokenType as 'Bearer',+ userInfo: userInfo || undefined,+ };++ // 存储 token 到 cookie 和 sessionStorage+ setTokenToCookie(tokenResponse.accessToken, tokenResponse.expiresIn);+ sessionStorage.setItem('market_auth_session', JSON.stringify(newSession));++ // 单独存储用户信息到 sessionStorage 供其他地方使用+ if (userInfo) {+ sessionStorage.setItem('market_user_info', JSON.stringify(userInfo));+ }++ setSession(newSession);+ setStatus('authenticated');++ console.log('[MarketAuth] Auto re-authorization completed successfully');+ } catch (error) {+ console.error('[MarketAuth] Auto re-authorization failed:', error);+ setStatus('unauthenticated');+ }+ }+ };++ handleAutoReauthorization();+ }, [shouldReauthorize, oidcClient]);++ const contextValue: MarketAuthContextType = {+ getCurrentUserInfo,+ isAuthenticated: status === 'authenticated',+ isLoading: status === 'loading',+ refreshToken,+ session,+ signIn,+ signOut,+ status,+ };++ return <MarketAuthContext.Provider value={contextValue}>{children}</MarketAuthContext.Provider>;+};++/**+ * 使用 Market 授权的 Hook+ */+export const useMarketAuth = (): MarketAuthContextType => {+ const context = useContext(MarketAuthContext);+ if (!context) {+ throw new Error('useMarketAuth must be used within a MarketAuthProvider');+ }+ return context;+};diff --git a/src/layout/AuthProvider/MarketAuth/errors.ts b/src/layout/AuthProvider/MarketAuth/errors.tsnew file mode 100644index 00000000000..54bf55a4c0b--- /dev/null+++ b/src/layout/AuthProvider/MarketAuth/errors.ts@@ -0,0 +1,75 @@+export type MarketAuthErrorCode =+ | 'authorizationFailed'+ | 'browserOnly'+ | 'codeConsumed'+ | 'codeVerifierMissing'+ | 'general'+ | 'handoffFailed'+ | 'handoffTimeout'+ | 'oidcNotReady'+ | 'openBrowserFailed'+ | 'openPopupFailed'+ | 'popupClosed'+ | 'sessionExpired'+ | 'stateMissing'+ | 'stateMismatch';++interface MarketAuthErrorOptions {+ cause?: unknown;+ message?: string;+ meta?: Record<string, unknown>;+}++export class MarketAuthError extends Error {+ public readonly code: MarketAuthErrorCode;++ public readonly meta?: Record<string, unknown>;++ constructor(code: MarketAuthErrorCode, options: MarketAuthErrorOptions = {}) {+ super(options.message ?? code);+ this.name = 'MarketAuthError';+ this.code = code;+ this.meta = options.meta;++ if (options.cause) {+ this.cause = options.cause;+ }+ }+}++const PATTERN_CODE_MAP: Array<[RegExp, MarketAuthErrorCode]> = [+ [/authorization can only be initiated in a browser environment/i, 'browserOnly'],+ [/authorization code already consumed/i, 'codeConsumed'],+ [/authorization popup was closed/i, 'popupClosed'],+ [/authorization session expired/i, 'sessionExpired'],+ [/authorization state not found/i, 'stateMissing'],+ [/state mismatch/i, 'stateMismatch'],+ [/code verifier not found/i, 'codeVerifierMissing'],+ [/failed to open authorization popup/i, 'openPopupFailed'],+ [/failed to open system browser/i, 'openBrowserFailed'],+ [/oidc client not initialized/i, 'oidcNotReady'],+ [/failed to retrieve authorization result from handoff endpoint/i, 'handoffFailed'],+ [/invalid state parameter/i, 'stateMismatch'],+ [/timeout/i, 'handoffTimeout'],+];++export const resolveMarketAuthError = (error: unknown): MarketAuthError => {+ if (error instanceof MarketAuthError) {+ return error;+ }++ if (error instanceof Error) {+ const matchedPattern = PATTERN_CODE_MAP.find(([pattern]) => pattern.test(error.message));++ if (matchedPattern) {+ return new MarketAuthError(matchedPattern[1], { cause: error });+ }++ return new MarketAuthError('authorizationFailed', {+ cause: error,+ meta: { message: error.message },+ });+ }++ return new MarketAuthError('general');+};diff --git a/src/layout/AuthProvider/MarketAuth/index.ts b/src/layout/AuthProvider/MarketAuth/index.tsnew file mode 100644index 00000000000..1865e81f027--- /dev/null+++ b/src/layout/AuthProvider/MarketAuth/index.ts@@ -0,0 +1,2 @@+export { MarketAuthProvider, useMarketAuth } from './MarketAuthProvider';+export type { MarketAuthContextType, MarketAuthSession, MarketAuthState } from './types';diff --git a/src/layout/AuthProvider/MarketAuth/oidc.ts b/src/layout/AuthProvider/MarketAuth/oidc.tsnew file mode 100644index 00000000000..3c719a9d235--- /dev/null+++ b/src/layout/AuthProvider/MarketAuth/oidc.ts@@ -0,0 +1,382 @@+import { MARKET_OIDC_ENDPOINTS } from '@/services/_url';++import { MarketAuthError } from './errors';+import { OIDCConfig, PKCEParams, TokenResponse } from './types';++/**+ * Market OIDC 授权工具类+ */+export class MarketOIDC {+ private config: OIDCConfig;++ private static readonly DESKTOP_HANDOFF_CLIENT = 'desktop';++ private static readonly DESKTOP_HANDOFF_POLL_INTERVAL = 1500;++ private static readonly DESKTOP_HANDOFF_TIMEOUT = 5 * 60 * 1000; // 5 minutes++ constructor(config: OIDCConfig) {+ this.config = config;+ }++ /**+ * 生成 PKCE code verifier+ */+ private generateCodeVerifier(): string {+ console.log('[MarketOIDC] Generating PKCE code verifier');+ const array = new Uint8Array(32);+ crypto.getRandomValues(array);+ return btoa(String.fromCharCode.apply(null, Array.from(array)))+ .replaceAll('+', '-')+ .replaceAll('/', '_')+ .replaceAll('=', '');+ }++ /**+ * 生成 PKCE code challenge+ */+ private async generateCodeChallenge(codeVerifier: string): Promise<string> {+ console.log('[MarketOIDC] Generating PKCE code challenge');+ const encoder = new TextEncoder();+ const data = encoder.encode(codeVerifier);+ const digest = await crypto.subtle.digest('SHA-256', data);+ return btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(digest))))+ .replaceAll('+', '-')+ .replaceAll('/', '_')+ .replaceAll('=', '');+ }++ /**+ * 生成随机 state+ */+ private generateState(): string {+ console.log('[MarketOIDC] Generating random state');+ const array = new Uint8Array(16);+ crypto.getRandomValues(array);+ return btoa(String.fromCharCode.apply(null, Array.from(array)))+ .replaceAll('+', '-')+ .replaceAll('/', '_')+ .replaceAll('=', '');+ }++ /**+ * 生成 PKCE 参数+ */+ async generatePKCEParams(): Promise<PKCEParams> {+ console.log('[MarketOIDC] Generating PKCE parameters');+ const codeVerifier = this.generateCodeVerifier();+ const codeChallenge = await this.generateCodeChallenge(codeVerifier);+ const state = this.generateState();++ // 将参数存储到 sessionStorage 用于后续验证+ sessionStorage.setItem('market_code_verifier', codeVerifier);+ sessionStorage.setItem('market_state', state);++ console.log('[MarketOIDC] PKCE parameters generated and stored');+ return {+ codeChallenge,+ codeVerifier,+ state,+ };+ }++ /**+ * 构建授权 URL+ */+ async buildAuthUrl(): Promise<string> {+ console.log('[MarketOIDC] Building authorization URL');+ const pkceParams = await this.generatePKCEParams();++ console.log('[MarketOIDC] this.config:', this.config);++ const authUrl = new URL(+ `${this.config.baseUrl.replace(/\/$/, '')}${MARKET_OIDC_ENDPOINTS.auth}`,+ );+ authUrl.searchParams.set('client_id', this.config.clientId);+ authUrl.searchParams.set('redirect_uri', this.config.redirectUri);+ authUrl.searchParams.set('response_type', 'code');+ authUrl.searchParams.set('scope', this.config.scope);+ authUrl.searchParams.set('state', pkceParams.state);+ authUrl.searchParams.set('code_challenge', pkceParams.codeChallenge);+ authUrl.searchParams.set('code_challenge_method', 'S256');++ console.log('[MarketOIDC] Authorization URL built:', authUrl.toString());+ return authUrl.toString();+ }++ /**+ * 用授权码换取访问令牌+ */+ async exchangeCodeForToken(code: string, state: string): Promise<TokenResponse> {+ console.log('[MarketOIDC] Exchanging authorization code for token');++ // 验证 state 参数+ const storedState = sessionStorage.getItem('market_state');+ if (state !== storedState) {+ console.error('[MarketOIDC] State parameter mismatch');+ throw new MarketAuthError('stateMismatch', { message: 'Invalid state parameter' });+ }++ // 获取存储的 code verifier+ const codeVerifier = sessionStorage.getItem('market_code_verifier');+ if (!codeVerifier) {+ console.error('[MarketOIDC] Code verifier not found');+ throw new MarketAuthError('codeVerifierMissing', { message: 'Code verifier not found' });+ }++ const tokenUrl = MARKET_OIDC_ENDPOINTS.token;+ const body = new URLSearchParams({+ client_id: this.config.clientId,+ code,+ code_verifier: codeVerifier,+ grant_type: 'authorization_code',+ redirect_uri: this.config.redirectUri,+ });++ console.log('[MarketOIDC] Sending token exchange request', {+ client_id: this.config.clientId,+ code,+ code_verifier: codeVerifier,+ grant_type: 'authorization_code',+ redirect_uri: this.config.redirectUri,+ });+ const response = await fetch(tokenUrl, {+ body: body.toString(),+ headers: {+ 'Content-Type': 'application/x-www-form-urlencoded',+ },+ method: 'POST',+ });++ console.log('[MarketOIDC] Token exchange response:', response);++ if (!response.ok) {+ const errorData = await response.json().catch(() => undefined);+ console.log('[MarketOIDC] Token exchange error data:', errorData);+ const errorMessage =+ `Token exchange failed: ${response.status} ${response.statusText} ${errorData?.error_description || errorData?.error || ''}`.trim();+ console.error('[MarketOIDC]', errorMessage);+ throw new MarketAuthError('authorizationFailed', {+ message: errorMessage,+ meta: {+ error: errorData,+ status: response.status,+ statusText: response.statusText,+ },+ });+ }++ const tokenData = (await response.json()) as TokenResponse;+ console.log('[MarketOIDC] Token exchange successful');++ // 清理 sessionStorage 中的临时数据+ sessionStorage.removeItem('market_code_verifier');+ sessionStorage.removeItem('market_state');++ return tokenData;+ }++ /**+ * 启动授权流程并返回授权结果+ */+ async startAuthorization(): Promise<{ code: string; state: string }> {+ console.log('[MarketOIDC] Starting authorization flow');+ const authUrl = await this.buildAuthUrl();++ if (typeof window === 'undefined') {+ throw new MarketAuthError('browserOnly', {+ message: 'Authorization can only be initiated in a browser environment.',+ });+ }++ const state = sessionStorage.getItem('market_state');+ if (!state) {+ console.error('[MarketOIDC] Missing state parameter in session storage');+ throw new MarketAuthError('stateMissing', {+ message: 'Authorization state not found. Please try again.',+ });+ }++ const isDesktopApp = process.env.NEXT_PUBLIC_IS_DESKTOP_APP === '1';++ // 在新窗口中打开授权页面+ let popup: Window | null = null;+ if (isDesktopApp) {+ // Electron 桌面端:使用 IPC 调用主进程打开系统浏览器+ console.log('[MarketOIDC] Desktop app detected, opening system browser via IPC');+ const { remoteServerService } = await import('@/services/electron/remoteServer');++ try {+ const result = await remoteServerService.requestMarketAuthorization({ authUrl });+ if (!result.success) {+ console.error('[MarketOIDC] Failed to open system browser:', result.error);+ throw new MarketAuthError('openBrowserFailed', {+ message: result.error || 'Failed to open system browser',+ meta: { error: result.error },+ });+ }+ console.log('[MarketOIDC] System browser opened successfully');+ } catch (error) {+ console.error('[MarketOIDC] Exception opening system browser:', error);+ throw new MarketAuthError('openBrowserFailed', {+ cause: error,+ message: 'Failed to open system browser. Please try again.',+ });+ }++ return this.pollDesktopHandoff(state);+ } else {+ // 浏览器环境:使用 window.open 打开弹窗+ popup = window.open(+ authUrl,+ 'market_auth',+ 'width=580,height=720,scrollbars=yes,resizable=yes',+ );++ if (!popup) {+ console.error('[MarketOIDC] Failed to open authorization popup');+ throw new MarketAuthError('openPopupFailed', {+ message: 'Failed to open authorization popup. Please check popup blocker settings.',+ });+ }+ }++ return new Promise((resolve, reject) => {+ let checkClosed: number | undefined;++ // 先声明,后定义,避免相互“定义前使用”+ let messageHandler: (event: MessageEvent) => void;++ // 清理函数+ function cleanup() {+ window.removeEventListener('message', messageHandler);+ if (checkClosed) clearInterval(checkClosed);+ }++ // 监听消息事件,等待授权完成+ messageHandler = (event: MessageEvent) => {+ console.log('[MarketOIDC] Received message from popup:', event.data);++ if (event.data.type === 'MARKET_AUTH_SUCCESS') {+ cleanup();++ // 不立即关闭弹窗,让用户看到成功状态+ // 弹窗会在3秒后自动关闭+ resolve({+ code: event.data.code,+ state: event.data.state,+ });+ } else if (event.data.type === 'MARKET_AUTH_ERROR') {+ cleanup();+ popup?.close();+ reject(+ new MarketAuthError('authorizationFailed', {+ message: event.data.error || 'Authorization failed',+ meta: { error: event.data.error },+ }),+ );+ }+ };++ window.addEventListener('message', messageHandler);++ // 检查弹窗是否被关闭+ if (popup) {+ checkClosed = setInterval(() => {+ if (popup.closed) {+ cleanup();+ reject(+ new MarketAuthError('popupClosed', { message: 'Authorization popup was closed' }),+ );+ }+ }, 1000) as unknown as number;+ }+ });+ }++ /**+ * 轮询 handoff 接口获取桌面端授权结果+ */+ private async pollDesktopHandoff(state: string): Promise<{ code: string; state: string }> {+ console.log('[MarketOIDC] Starting desktop handoff polling with state:', state);++ const startTime = Date.now();++ const pollUrl = `${MARKET_OIDC_ENDPOINTS.handoff}?id=${encodeURIComponent(+ state,+ )}&client=${encodeURIComponent(MarketOIDC.DESKTOP_HANDOFF_CLIENT)}`;++ console.log('[MarketOIDC] Poll URL:', pollUrl);++ while (Date.now() - startTime < MarketOIDC.DESKTOP_HANDOFF_TIMEOUT) {+ try {+ const response = await fetch(pollUrl, {+ cache: 'no-store',+ credentials: 'include',+ });++ const data = await response.json().catch(() => undefined);++ console.log('[MarketOIDC] Poll response:', response.status, data);++ if (+ response.status === 200 &&+ data?.status === 'success' &&+ typeof data?.code === 'string'+ ) {+ console.log('[MarketOIDC] Desktop handoff succeeded');+ return {+ code: data.code,+ state,+ };+ }++ if (response.status === 202 || data?.status === 'pending') {+ await new Promise<void>((resolve) => {+ setTimeout(resolve, MarketOIDC.DESKTOP_HANDOFF_POLL_INTERVAL);+ });+ continue;+ }++ if (response.status === 404 || data?.status === 'consumed') {+ throw new MarketAuthError('codeConsumed', {+ message: 'Authorization code already consumed. Please retry.',+ });+ }++ if (response.status === 410 || data?.status === 'expired') {+ throw new MarketAuthError('sessionExpired', {+ message: 'Authorization session expired. Please restart the sign-in process.',+ });+ }++ const errorMessage =+ data?.error || data?.message || `Handoff request failed with status ${response.status}`;+ console.error('[MarketOIDC] Handoff polling failed:', errorMessage);+ throw new MarketAuthError('handoffFailed', {+ message: errorMessage,+ meta: { data, status: response.status },+ });+ } catch (error) {+ console.error('[MarketOIDC] Error while polling handoff endpoint:', error);+ if (error instanceof MarketAuthError) {+ throw error;+ }+ const message =+ error instanceof Error+ ? error.message+ : 'Failed to retrieve authorization result from handoff endpoint.';+ throw new MarketAuthError('handoffFailed', {+ cause: error,+ message,+ });+ }+ }++ console.warn('[MarketOIDC] Desktop handoff polling timed out');+ throw new MarketAuthError('handoffTimeout', {+ message:+ 'Authorization timeout. Please complete the authorization in the browser and try again.',+ });+ }+}diff --git a/src/layout/AuthProvider/MarketAuth/types.ts b/src/layout/AuthProvider/MarketAuth/types.tsnew file mode 100644index 00000000000..9a177f13481--- /dev/null+++ b/src/layout/AuthProvider/MarketAuth/types.ts@@ -0,0 +1,64 @@+export interface MarketUserInfo {+ accountId: number;+ clientId: string;+ grantId: string;+ scopes: string[];+ sub: string;+ tokenData: {+ accountId: string;+ clientId: string;+ exp: number;+ expiresWithSession: boolean;+ grantId: string;+ gty: string;+ iat: number;+ jti: string;+ kind: string;+ scope: string;+ sessionUid: string;+ };+}++export interface MarketAuthSession {+ accessToken: string;+ expiresAt: number;+ expiresIn: number;+ scope: string;+ tokenType: 'Bearer';+ userInfo?: MarketUserInfo;+}++export interface MarketAuthState {+ isAuthenticated: boolean;+ isLoading: boolean;+ session: MarketAuthSession | null;+ status: 'loading' | 'authenticated' | 'unauthenticated';+}++export interface MarketAuthContextType extends MarketAuthState {+ getCurrentUserInfo: () => MarketUserInfo | null;+ refreshToken: () => Promise<boolean>;+ signIn: () => Promise<number | null>;+ signOut: () => void;+}++export interface OIDCConfig {+ baseUrl: string;+ clientId: string;+ redirectUri: string;+ scope: string;+}++export interface PKCEParams {+ codeChallenge: string;+ codeVerifier: string;+ state: string;+}++export interface TokenResponse {+ accessToken: string;+ expiresIn: number;+ idToken?: string;+ scope: string;+ tokenType: string;+}diff --git a/src/layout/AuthProvider/index.tsx b/src/layout/AuthProvider/index.tsxindex 313f14180bd..e138f019780 100644--- a/src/layout/AuthProvider/index.tsx+++ b/src/layout/AuthProvider/index.tsx@@ -1,17 +1,30 @@import { PropsWithChildren } from 'react';+import { isDesktop } from '@/const/version';import { authEnv } from '@/envs/auth';import Clerk from './Clerk';+import { MarketAuthProvider } from './MarketAuth';import NextAuth from './NextAuth';import NoAuth from './NoAuth';const AuthProvider = ({ children }: PropsWithChildren) => {- if (authEnv.NEXT_PUBLIC_ENABLE_CLERK_AUTH) return <Clerk>{children}</Clerk>;+ // 获取内部 AuthProvider+ let InnerAuthProvider;+ if (authEnv.NEXT_PUBLIC_ENABLE_CLERK_AUTH) {+ InnerAuthProvider = ({ children }: PropsWithChildren) => <Clerk>{children}</Clerk>;+ } else if (authEnv.NEXT_PUBLIC_ENABLE_NEXT_AUTH) {+ InnerAuthProvider = ({ children }: PropsWithChildren) => <NextAuth>{children}</NextAuth>;+ } else {+ InnerAuthProvider = ({ children }: PropsWithChildren) => <NoAuth>{children}</NoAuth>;+ }- if (authEnv.NEXT_PUBLIC_ENABLE_NEXT_AUTH) return <NextAuth>{children}</NextAuth>;-- return <NoAuth>{children}</NoAuth>;+ // 将 MarketAuthProvider 包装在内部 AuthProvider 之外+ return (+ <InnerAuthProvider>+ <MarketAuthProvider isDesktop={isDesktop}>{children}</MarketAuthProvider>+ </InnerAuthProvider>+ );};export default AuthProvider;diff --git a/src/locales/default/discover.ts b/src/locales/default/discover.tsindex 21dadd02db1..4ff65f2783f 100644--- a/src/locales/default/discover.ts+++ b/src/locales/default/discover.ts@@ -42,8 +42,28 @@ export default {openingQuestions: '开场问题',title: '助手设定',},+ version: {+ empty: '暂无历史版本',+ status: {+ archived: '已归档',+ deprecated: '已拒绝',+ unpublished: '审核中',+ },+ table: {+ isLatest: '最新版本',+ isValidated: '已验证',+ publishAt: '发布日期',+ version: '版本号',+ },+ title: '版本历史',+ },},list: '助手列表',+ marketSource: {+ label: '切换市场源',+ legacy: '旧市场',+ new: '新市场',+ },more: '更多',plugins: '集成插件',recentSubmits: '最近更新',@@ -51,11 +71,36 @@ export default {createdAt: '最近发布',identifier: '助手 ID',knowledgeCount: '知识库数量',+ myown: '查看我的',pluginCount: '插件数量',title: '助手名称',tokenUsage: 'Token 使用量',},suggestions: '相关推荐',+ status: {+ archived: {+ reasons: {+ official: '助手有安全/政治等问题,被官方下架',+ owner: '开发助手的 owner 主动下架/归档该助手',+ },+ subtitle: '当前访问的助手已经因为以下可能的原因被归档了:',+ title: '助手已被归档',+ },+ backToMarket: '返回助手市场',+ deprecated: {+ reasons: {+ official: '助手有安全/政治等问题,被官方下架',+ owner: '开发助手的 owner 主动下架/拒绝该助手',+ },+ subtitle: '当前访问的助手已经因为以下可能的原因被拒绝了:',+ title: '助手已被拒绝',+ },+ support: '有各种问题请复制链接发送到 <1>[email protected]</1> 进行咨询。',+ unpublished: {+ subtitle: '当前访问的助手正在进行版本审核中,如果有疑问复制链接发送问题到 <1>[email protected]</1> 进行咨询。',+ title: '助手正在审核中',+ },+ },systemRole: '助手设定',tokenUsage: '助手提示词 Token 使用量',try: '试一下',diff --git a/src/locales/default/index.ts b/src/locales/default/index.tsindex 5a18a883afa..6f870c9a7c5 100644--- a/src/locales/default/index.ts+++ b/src/locales/default/index.ts@@ -14,6 +14,7 @@ import hotkey from './hotkey';import image from './image';import knowledgeBase from './knowledgeBase';import labs from './labs';+import marketAuth from './marketAuth';import metadata from './metadata';import migration from './migration';import modelProvider from './modelProvider';@@ -47,6 +48,7 @@ const resources = {image,knowledgeBase,labs,+ marketAuth,metadata,migration,modelProvider,diff --git a/src/locales/default/marketAuth.ts b/src/locales/default/marketAuth.tsnew file mode 100644index 00000000000..c6a54100a7d--- /dev/null+++ b/src/locales/default/marketAuth.ts@@ -0,0 +1,42 @@+export default {+ callback: {+ buttons: {+ close: '关闭窗口',+ },+ messages: {+ authFailed: '授权失败: {{error}}',+ missingParams: '授权参数缺失',+ processing: '正在处理授权...',+ successWithCountdown: '{{message}} 窗口将在 {{countdown}} 秒后自动关闭',+ successWithRedirect: '授权成功!正在跳转...',+ },+ titles: {+ error: '授权失败',+ loading: 'LobeHub Market 授权',+ success: '授权成功',+ },+ },+ errors: {+ authorizationFailed: '授权失败,请重试。',+ browserOnly: '授权流程只能在浏览器中发起。',+ codeConsumed: '授权码已被使用,请重新尝试。',+ codeVerifierMissing: '授权会话无效,请重新发起登录流程。',+ general: '授权出现错误,请重试。',+ handoffFailed: '无法获取授权结果,请重试。',+ handoffTimeout: '授权超时,请在浏览器中完成操作后重试。',+ oidcNotReady: '授权服务尚未就绪,请稍后再试。',+ openBrowserFailed: '无法打开系统浏览器,请重试。',+ openPopupFailed: '无法打开授权弹窗,请检查浏览器的弹窗拦截设置。',+ popupClosed: '授权窗口未完成即被关闭。',+ sessionExpired: '授权会话已过期,请重新登录。',+ stateMismatch: '授权状态不匹配,请重试。',+ stateMissing: '未找到授权状态,请重试。',+ },+ messages: {+ loading: '正在启动授权流程...',+ success: {+ submit: '授权成功!现在可以发布助手了。',+ upload: '授权成功!现在可以发布新版本了。',+ },+ },+};diff --git a/src/locales/default/setting.ts b/src/locales/default/setting.tsindex e3bc9b1a59e..f403a70049a 100644--- a/src/locales/default/setting.ts+++ b/src/locales/default/setting.ts@@ -2,6 +2,45 @@ export default {about: {title: '关于',},+ agentInfoDescription: {+ basic: {+ avatar: '头像',+ description: '描述',+ name: '名称',+ tags: '标签',+ title: '助手信息',+ },+ chat: {+ displayMode: '展示模式',+ enableHistoryCount: '启用历史消息计数',+ historyCount: '历史消息数量',+ no: '否',+ searchMode: '搜索模式',+ title: '聊天偏好',+ yes: '是',+ },+ model: {+ maxTokens: '最大 Token 数',+ model: '模型',+ provider: '服务商',+ temperature: '温度',+ title: '模型设置',+ topP: 'Top P 值',+ },+ plugins: {+ count: '插件设置({{count}})',+ empty: '尚未安装插件',+ title: '已安装插件',+ },+ role: {+ systemRole: '系统提示词',+ title: '角色设置',+ },+ value: {+ unset: '未设置',+ untitled: '未命名助手',+ },+ },agentTab: {chat: '聊天偏好',meta: '助手信息',@@ -18,6 +57,8 @@ export default {},title: '数据统计',},+ checking: '检查中...',+ checkingPermissions: '检查权限中...',danger: {clear: {action: '立即清除',@@ -148,6 +189,58 @@ export default {},waitingForMore: '更多模型正在 <1>计划接入</1> 中,敬请期待',},+ marketPublish: {+ modal: {+ changelog: {+ extra: '描述此版本的主要变更和改进',+ label: '变更日志',+ maxLengthError: '变更日志不能超过500个字符',+ placeholder: '请输入变更日志',+ required: '请输入变更日志',+ },+ comparison: {+ local: '本地当前版本',+ remote: '当前发布版本',+ },+ identifier: {+ extra: '标识符将作为助手的唯一标识,建议使用小写字母、数字和连字符',+ label: '助手标识符',+ lengthError: '标识符长度应在3-50个字符之间',+ patternError: '标识符只能包含小写字母、数字和连字符',+ placeholder: '请输入助手的唯一标识符,如: web-development',+ required: '请输入助手标识符',+ },+ loading: {+ fetchingRemote: '正在加载远程数据...',+ submit: '正在发布助手...',+ upload: '正在发布新版本...',+ },+ messages: {+ createVersionFailed: '版本创建失败: {{message}}',+ fetchRemoteFailed: '获取远程助手数据失败',+ missingIdentifier: '当前助手还没有市场标识符',+ notAuthenticated: '请先登录市场账户',+ publishFailed: '发布失败: {{message}}',+ },+ submitButton: '发布',+ title: {+ submit: '分享到助手市场',+ upload: '发布新版本',+ },+ },+ resultModal: {+ message: '助手已提交审核,审核通过后将自动上线。点击「在市场查看」查看已发布的助手。',+ view: '在市场查看',+ },+ submit: {+ button: '分享到市场',+ tooltip: '分享助手到市场',+ },+ upload: {+ button: '发布新版本',+ tooltip: '发布新版本到助手市场',+ },+ },message: {success: '更新成功',},@@ -565,7 +658,7 @@ export default {},submitAgentModal: {button: '提交助手',- identifier: 'identifier 助手标识符',+ identifier: '助手标识符(identifier)',metaMiss: '请补全助手信息后提交,需要包含名称、描述和标签',placeholder: '请输入助手的标识符,需要是唯一的,比如 web-development',tooltips: '分享到助手市场',diff --git a/src/server/routers/lambda/market/index.ts b/src/server/routers/lambda/market/index.tsindex dbd27e058fe..2ca0061475e 100644--- a/src/server/routers/lambda/market/index.ts+++ b/src/server/routers/lambda/market/index.ts@@ -10,6 +10,8 @@ import { AssistantSorts, McpConnectionType, McpSorts, ModelSorts, PluginSorts, Pconst log = debug('lambda-router:market');+const marketSourceSchema = z.enum(['legacy', 'new']);+const marketProcedure = publicProcedure.use(async ({ ctx, next }) => {return next({ctx: {@@ -26,6 +28,7 @@ export const marketRouter = router({.object({locale: z.string().optional(),q: z.string().optional(),+ source: marketSourceSchema.optional(),}).optional(),)@@ -48,6 +51,8 @@ export const marketRouter = router({z.object({identifier: z.string(),locale: z.string().optional(),+ source: marketSourceSchema.optional(),+ version: z.string().optional(),}),).query(async ({ input, ctx }) => {@@ -64,19 +69,27 @@ export const marketRouter = router({}}),- getAssistantIdentifiers: marketProcedure.query(async ({ ctx }) => {- log('getAssistantIdentifiers called');+ getAssistantIdentifiers: marketProcedure+ .input(+ z+ .object({+ source: marketSourceSchema.optional(),+ })+ .optional(),+ )+ .query(async ({ input, ctx }) => {+ log('getAssistantIdentifiers called with input: %O', input);- try {- return await ctx.discoverService.getAssistantIdentifiers();- } catch (error) {- log('Error fetching assistant identifiers: %O', error);- throw new TRPCError({- code: 'INTERNAL_SERVER_ERROR',- message: 'Failed to fetch assistant identifiers',- });- }- }),+ try {+ return await ctx.discoverService.getAssistantIdentifiers(input);+ } catch (error) {+ log('Error fetching assistant identifiers: %O', error);+ throw new TRPCError({+ code: 'INTERNAL_SERVER_ERROR',+ message: 'Failed to fetch assistant identifiers',+ });+ }+ }),getAssistantList: marketProcedure.input(@@ -86,9 +99,11 @@ export const marketRouter = router({connectionType: z.nativeEnum(McpConnectionType).optional(),locale: z.string().optional(),order: z.enum(['asc', 'desc']).optional(),+ ownerId: z.string().optional(),page: z.number().optional(),pageSize: z.number().optional(),q: z.string().optional(),+ source: marketSourceSchema.optional(),sort: z.nativeEnum(AssistantSorts).optional(),}).optional(),diff --git a/src/server/services/discover/index.test.ts b/src/server/services/discover/index.test.tsindex 190cfbd78f8..e193afa6ee5 100644--- a/src/server/services/discover/index.test.ts+++ b/src/server/services/discover/index.test.ts@@ -19,9 +19,6 @@ vi.mock('@/locales/resources', () => ({}),}));-// Set environment variable for tests-process.env.MARKET_BASE_URL = 'http://localhost:8787/api';-// Mock constants with inline datavi.mock('model-bank', async (importOriginal) => {const actual = await importOriginal();@@ -130,6 +127,68 @@ const mockAssistantList = [},];+const mockMarketAssistantList = [+ {+ identifier: 'market-assistant-1',+ name: 'Market Assistant 1',+ summary: 'First market assistant from new source',+ author: { name: 'Market Author 1', avatar: 'https://example.com/avatar1.png' },+ ownerId: 101,+ category: 'productivity',+ createdAt: '2024-02-01T00:00:00Z',+ updatedAt: '2024-02-02T00:00:00Z',+ avatar: 'https://example.com/avatar1.png',+ tags: ['market', 'assistant'],+ status: 'published',+ tokenUsage: 256,+ config: {+ systemRole: 'You are a productive assistant.',+ knowledgeBases: [{ id: 'kb-1' }],+ plugins: [{ id: 'plugin-1' }],+ },+ },+ {+ identifier: 'market-assistant-2',+ name: 'Market Assistant 2',+ summary: 'Second market assistant from new source',+ author: 'Market Author 2',+ ownerId: 202,+ category: 'creativity',+ createdAt: '2024-02-04T00:00:00Z',+ updatedAt: '2024-02-05T00:00:00Z',+ avatar: 'https://example.com/avatar2.png',+ tags: ['market', 'creative'],+ status: 'published',+ tokenUsage: 128,+ config: {+ systemRole: 'You are a creative assistant.',+ knowledgeBases: [],+ plugins: [],+ },+ },+];++const mockMarketAgentDetail = {+ ...mockMarketAssistantList[0],+ documentationUrl: 'https://example.com/docs',+ version: '1.0.0',+ versions: [+ {+ version: '1.0.0',+ status: 'published',+ isLatest: true,+ isValidated: true,+ createdAt: '2024-02-02T00:00:00Z',+ },+ ],+ examples: [+ {+ content: 'Example content',+ role: 'user',+ },+ ],+};+const mockPluginList = [{identifier: 'plugin-1',@@ -182,6 +241,24 @@ describe('DiscoverService', () => {// Setup MarketSDK mockmockMarket = {+ agents: {+ getAgentList: vi.fn().mockResolvedValue({+ items: mockMarketAssistantList,+ totalCount: mockMarketAssistantList.length,+ currentPage: 1,+ pageSize: 20,+ totalPages: 1,+ }),+ getAgentDetail: vi.fn().mockResolvedValue(mockMarketAgentDetail),+ getCategories: vi.fn().mockResolvedValue([+ { category: 'productivity', count: 10 },+ { category: 'creativity', count: 5 },+ ]),+ getPublishedIdentifiers: vi.fn().mockResolvedValue([+ { id: 'market-assistant-1', lastModified: '2024-02-02T00:00:00Z' },+ { id: 'market-assistant-2', lastModified: '2024-02-05T00:00:00Z' },+ ]),+ },plugins: {getCategories: vi.fn().mockResolvedValue([{ category: 'tools', count: 5 },@@ -214,10 +291,68 @@ describe('DiscoverService', () => {service.market = mockMarket;});- describe('Assistant Market', () => {+ describe('Assistant Market (new source)', () => {+ it('getAssistantList should transform market SDK response', async () => {+ const result = await service.getAssistantList();++ expect(mockMarket.agents.getAgentList).toHaveBeenCalled();+ expect(result.items[0]).toEqual(+ expect.objectContaining({+ identifier: 'market-assistant-1',+ title: 'Market Assistant 1',+ author: 'Market Author 1',+ knowledgeCount: 1,+ pluginCount: 1,+ }),+ );+ });++ it('getAssistantDetail should fetch from market SDK by default', async () => {+ const result = await service.getAssistantDetail({+ identifier: 'market-assistant-1',+ });++ expect(mockMarket.agents.getAgentDetail).toHaveBeenCalledWith('market-assistant-1', {+ locale: 'en',+ version: undefined,+ });+ expect(result).toEqual(+ expect.objectContaining({+ identifier: 'market-assistant-1',+ title: 'Market Assistant 1',+ related: expect.any(Array),+ }),+ );+ });++ it('getAssistantCategories should proxy to market SDK', async () => {+ const result = await service.getAssistantCategories({ locale: 'en-US', q: 'market' });++ expect(mockMarket.agents.getCategories).toHaveBeenCalledWith({+ locale: 'en',+ q: 'market',+ });+ expect(result).toEqual([+ { category: 'productivity', count: 10 },+ { category: 'creativity', count: 5 },+ ]);+ });++ it('getAssistantIdentifiers should read from market SDK', async () => {+ const result = await service.getAssistantIdentifiers();++ expect(mockMarket.agents.getPublishedIdentifiers).toHaveBeenCalled();+ expect(result).toEqual([+ { identifier: 'market-assistant-1', lastModified: '2024-02-02T00:00:00Z' },+ { identifier: 'market-assistant-2', lastModified: '2024-02-05T00:00:00Z' },+ ]);+ });+ });++ describe('Assistant Market (legacy source)', () => {describe('getAssistantList', () => {it('should return formatted assistant list with default parameters', async () => {- const result = await service.getAssistantList();+ const result = await service.getAssistantList({ source: 'legacy' });expect(result).toEqual({currentPage: 1,@@ -242,7 +377,10 @@ describe('DiscoverService', () => {});it('should filter by category', async () => {- const result = await service.getAssistantList({ category: 'productivity' });+ const result = await service.getAssistantList({+ category: 'productivity',+ source: 'legacy',+ });expect(result.items).toHaveLength(2);expect(result.items.map((item) => item.identifier)).toContain('assistant-1');@@ -250,7 +388,7 @@ describe('DiscoverService', () => {});it('should filter by search query', async () => {- const result = await service.getAssistantList({ q: 'creative' });+ const result = await service.getAssistantList({ q: 'creative', source: 'legacy' });expect(result.items).toHaveLength(2);expect(result.items.map((item) => item.identifier)).toContain('assistant-2');@@ -261,6 +399,7 @@ describe('DiscoverService', () => {const result = await service.getAssistantList({sort: AssistantSorts.CreatedAt,order: 'desc',+ source: 'legacy',});expect(result.items[0].identifier).toBe('assistant-3');@@ -272,6 +411,7 @@ describe('DiscoverService', () => {const result = await service.getAssistantList({sort: AssistantSorts.Title,order: 'asc',+ source: 'legacy',});// Note: The service has reversed logic for title sorting@@ -280,7 +420,7 @@ describe('DiscoverService', () => {});it('should paginate results', async () => {- const result = await service.getAssistantList({ page: 1, pageSize: 1 });+ const result = await service.getAssistantList({ page: 1, pageSize: 1, source: 'legacy' });expect(result.items).toHaveLength(1);expect(result.currentPage).toBe(1);@@ -293,6 +433,7 @@ describe('DiscoverService', () => {it('should return assistant detail with related items', async () => {const result = await service.getAssistantDetail({identifier: 'assistant-1',+ source: 'legacy',});expect(result).toEqual(@@ -311,6 +452,7 @@ describe('DiscoverService', () => {const result = await service.getAssistantDetail({identifier: 'non-existent',+ source: 'legacy',});expect(result).toBeUndefined();@@ -319,7 +461,7 @@ describe('DiscoverService', () => {describe('getAssistantCategories', () => {it('should return category counts', async () => {- const result = await service.getAssistantCategories();+ const result = await service.getAssistantCategories({ source: 'legacy' });expect(result).toEqual([{ category: 'productivity', count: 2 },@@ -328,7 +470,7 @@ describe('DiscoverService', () => {});it('should filter categories by search query', async () => {- const result = await service.getAssistantCategories({ q: 'creative' });+ const result = await service.getAssistantCategories({ q: 'creative', source: 'legacy' });expect(result).toEqual([{@@ -345,7 +487,7 @@ describe('DiscoverService', () => {describe('getAssistantIdentifiers', () => {it('should return list of identifiers with lastModified dates', async () => {- const result = await service.getAssistantIdentifiers();+ const result = await service.getAssistantIdentifiers({ source: 'legacy' });expect(result).toEqual([{ identifier: 'assistant-1', lastModified: '2024-01-01T00:00:00Z' },diff --git a/src/server/services/discover/index.ts b/src/server/services/discover/index.tsindex 8365c7e25aa..f95fa28d2fb 100644--- a/src/server/services/discover/index.ts+++ b/src/server/services/discover/index.ts@@ -7,6 +7,7 @@ import {} from '@lobechat/const';import {AssistantListResponse,+ AssistantMarketSource,AssistantQueryParams,AssistantSorts,CacheRevalidate,@@ -60,9 +61,12 @@ export class DiscoverService {constructor({ accessToken }: { accessToken?: string } = {}) {this.market = new MarketSDK({accessToken,- baseURL: process.env.MARKET_BASE_URL,+ baseURL: process.env.NEXT_PUBLIC_MARKET_BASE_URL,});- log('DiscoverService initialized with market baseURL: %s', process.env.MARKET_BASE_URL);+ log(+ 'DiscoverService initialized with market baseURL: %s',+ process.env.NEXT_PUBLIC_MARKET_BASE_URL,+ );}async registerClient({ userAgent }: { userAgent?: string }) {@@ -102,7 +106,7 @@ export class DiscoverService {async fetchM2MToken(params: { clientId: string; clientSecret: string }) {// 使用传入的客户端凭证创建新的 MarketSDK 实例const tokenMarket = new MarketSDK({- baseURL: process.env.MARKET_BASE_URL,+ baseURL: process.env.NEXT_PUBLIC_MARKET_BASE_URL,clientId: params.clientId,clientSecret: params.clientSecret,});@@ -208,25 +212,47 @@ export class DiscoverService {return result;};- // ============================== Assistant Market ==============================+ private normalizeAuthorField = (author: unknown): string => {+ if (!author) return '';++ if (typeof author === 'string') return author;++ if (typeof author === 'object') {+ const { avatar, url, name } = author as {+ avatar?: unknown;+ name?: unknown;+ url?: unknown;+ };++ if (typeof name === 'string' && name.length > 0) return name;+ if (typeof avatar === 'string' && avatar.length > 0) return avatar;+ if (typeof url === 'string' && url.length > 0) return url;+ }- private _getAssistantList = async (locale?: string): Promise<DiscoverAssistantItem[]> => {- log('_getAssistantList: locale=%s', locale);+ return '';+ };++ private isLegacySource = (source?: AssistantMarketSource) => source === 'legacy';++ private legacyGetAssistantListRaw = async (locale?: string): Promise<DiscoverAssistantItem[]> => {+ log('legacyGetAssistantListRaw: locale=%s', locale);const normalizedLocale = normalizeLocale(locale);const list = await this.assistantStore.getAgentIndex(normalizedLocale);if (!list || !Array.isArray(list)) {- log('_getAssistantList: no valid list found, returning empty array');+ log('legacyGetAssistantListRaw: no valid list found, returning empty array');return [];}const result = list.map(({ meta, ...item }) => ({ ...item, ...meta }));- log('_getAssistantList: returning %d items', result.length);+ log('legacyGetAssistantListRaw: returning %d items', result.length);return result;};- getAssistantCategories = async (params: CategoryListQuery = {}): Promise<CategoryItem[]> => {- log('getAssistantCategories: params=%O', params);+ private legacyGetAssistantCategories = async (+ params: CategoryListQuery = {},+ ): Promise<CategoryItem[]> => {+ log('legacyGetAssistantCategories: params=%O', params);const { q, locale } = params;- let list = await this._getAssistantList(locale);+ let list = await this.legacyGetAssistantListRaw(locale);if (q) {const originalCount = list.length;list = list.filter((item) => {@@ -238,7 +264,7 @@ export class DiscoverService {.includes(decodeURIComponent(q).toLowerCase());});log(- 'getAssistantCategories: filtered by query "%s", %d -> %d items',+ 'legacyGetAssistantCategories: filtered by query "%s", %d -> %d items',q,originalCount,list.length,@@ -246,25 +272,26 @@ export class DiscoverService {}const categoryCounts = countBy(list, (item) => item.category);const result = Object.entries(categoryCounts)- .filter(([category]) => Boolean(category)) // 过滤掉空值+ .filter(([category]) => Boolean(category)).map(([category, count]) => ({category,count,}));- log('getAssistantCategories: returning %d categories', result.length);+ log('legacyGetAssistantCategories: returning %d categories', result.length);return result;};- getAssistantDetail = async (params: {+ private legacyGetAssistantDetail = async (params: {identifier: string;locale?: string;+ version?: string;}): Promise<DiscoverAssistantDetail | undefined> => {- log('getAssistantDetail: params=%O', params);+ log('legacyGetAssistantDetail: params=%O', params);const { locale, identifier } = params;const normalizedLocale = normalizeLocale(locale);let data = await this.assistantStore.getAgent(identifier, normalizedLocale);if (!data) {- log('getAssistantDetail: assistant not found for identifier=%s', identifier);+ log('legacyGetAssistantDetail: assistant not found for identifier=%s', identifier);return;}const { meta, ...item } = data;@@ -274,30 +301,36 @@ export class DiscoverService {locale,page: 1,pageSize: 7,+ source: 'legacy',});const result = {...assistant,related: list.items.filter((item) => item.identifier !== assistant.identifier).slice(0, 6),};- log('getAssistantDetail: returning assistant with %d related items', result.related.length);+ log(+ 'legacyGetAssistantDetail: returning assistant with %d related items',+ result.related.length,+ );return result;};- getAssistantIdentifiers = async (): Promise<IdentifiersResponse> => {- log('getAssistantIdentifiers: fetching identifiers');- const list = await this._getAssistantList();+ private legacyGetAssistantIdentifiers = async (): Promise<IdentifiersResponse> => {+ log('legacyGetAssistantIdentifiers: fetching identifiers');+ const list = await this.legacyGetAssistantListRaw();const result = list.map((item) => {return {identifier: item.identifier,lastModified: item.createdAt,};});- log('getAssistantIdentifiers: returning %d identifiers', result.length);+ log('legacyGetAssistantIdentifiers: returning %d identifiers', result.length);return result;};- getAssistantList = async (params: AssistantQueryParams = {}): Promise<AssistantListResponse> => {- log('getAssistantList: params=%O', params);+ private legacyGetAssistantList = async (+ params: AssistantQueryParams = {},+ ): Promise<AssistantListResponse> => {+ log('legacyGetAssistantList: params=%O', params);const {locale,category,@@ -306,14 +339,29 @@ export class DiscoverService {pageSize = 20,q,sort = AssistantSorts.CreatedAt,+ ownerId,} = params;- let list = await this._getAssistantList(locale);+ const currentPage = Number(page) || 1;+ const currentPageSize = Number(pageSize) || 20;++ if (ownerId) {+ log('legacyGetAssistantList: ownerId filter not supported in legacy source');+ return {+ currentPage,+ items: [],+ pageSize: currentPageSize,+ totalCount: 0,+ totalPages: 0,+ };+ }++ let list = await this.legacyGetAssistantListRaw(locale);const originalCount = list.length;if (category) {list = list.filter((item) => item.category === category);log(- 'getAssistantList: filtered by category "%s", %d -> %d items',+ 'legacyGetAssistantList: filtered by category "%s", %d -> %d items',category,originalCount,list.length,@@ -330,11 +378,16 @@ export class DiscoverService {.toLowerCase().includes(decodeURIComponent(q).toLowerCase());});- log('getAssistantList: filtered by query "%s", %d -> %d items', q, beforeFilter, list.length);+ log(+ 'legacyGetAssistantList: filtered by query "%s", %d -> %d items',+ q,+ beforeFilter,+ list.length,+ );}if (sort) {- log('getAssistantList: sorting by %s %s', sort, order);+ log('legacyGetAssistantList: sorting by %s %s', sort, order);switch (sort) {case AssistantSorts.CreatedAt: {list = list.sort((a, b) => {@@ -349,9 +402,9 @@ export class DiscoverService {case AssistantSorts.KnowledgeCount: {list = list.sort((a, b) => {if (order === 'asc') {- return a.knowledgeCount - b.knowledgeCount;+ return (a.knowledgeCount || 0) - (b.knowledgeCount || 0);} else {- return b.knowledgeCount - a.knowledgeCount;+ return (b.knowledgeCount || 0) - (a.knowledgeCount || 0);}});break;@@ -359,9 +412,9 @@ export class DiscoverService {case AssistantSorts.PluginCount: {list = list.sort((a, b) => {if (order === 'asc') {- return a.pluginCount - b.pluginCount;+ return (a.pluginCount || 0) - (b.pluginCount || 0);} else {- return b.pluginCount - a.pluginCount;+ return (b.pluginCount || 0) - (a.pluginCount || 0);}});break;@@ -369,9 +422,9 @@ export class DiscoverService {case AssistantSorts.TokenUsage: {list = list.sort((a, b) => {if (order === 'asc') {- return a.tokenUsage - b.tokenUsage;+ return (a.tokenUsage || 0) - (b.tokenUsage || 0);} else {- return b.tokenUsage - a.tokenUsage;+ return (b.tokenUsage || 0) - (a.tokenUsage || 0);}});break;@@ -396,25 +449,271 @@ export class DiscoverService {});break;}+ default: {+ break;+ }}}+ const start = (currentPage - 1) * currentPageSize;+ const end = currentPage * currentPageSize;const result = {- currentPage: page,- items: list.slice((page - 1) * pageSize, page * pageSize),- pageSize,+ currentPage,+ items: list.slice(start, end),+ pageSize: currentPageSize,totalCount: list.length,- totalPages: Math.ceil(list.length / pageSize),+ totalPages: Math.ceil(list.length / currentPageSize),};log(- 'getAssistantList: returning page %d/%d with %d items',- page,+ 'legacyGetAssistantList: returning page %d/%d with %d items',+ currentPage,result.totalPages,result.items.length,);return result;};+ // ============================== Assistant Market ==============================++ getAssistantCategories = async (+ params: CategoryListQuery & { source?: AssistantMarketSource } = {},+ ): Promise<CategoryItem[]> => {+ log('getAssistantCategories: params=%O', params);+ const { source, ...rest } = params;+ if (this.isLegacySource(source)) {+ return this.legacyGetAssistantCategories(rest);+ }++ const { q, locale } = rest;+ const normalizedLocale = normalizeLocale(locale);++ try {+ // @ts-ignore+ const categories = await this.market.agents.getCategories({+ locale: normalizedLocale,+ q,+ });+ log('getAssistantCategories: returning %d categories from market SDK', categories.length);+ return categories;+ } catch (error) {+ log('getAssistantCategories: error fetching from market SDK: %O', error);+ return [];+ }+ };++ getAssistantDetail = async (params: {+ identifier: string;+ locale?: string;+ source?: AssistantMarketSource;+ version?: string;+ }): Promise<DiscoverAssistantDetail | undefined> => {+ log('getAssistantDetail: params=%O', params);+ const { source, ...rest } = params;+ if (this.isLegacySource(source)) {+ return this.legacyGetAssistantDetail(rest);+ }++ const { locale, identifier, version } = rest;+ const normalizedLocale = normalizeLocale(locale);++ try {+ // @ts-ignore+ const data = await this.market.agents.getAgentDetail(identifier, {+ locale: normalizedLocale,+ version,+ });++ if (!data) {+ log('getAssistantDetail: assistant not found for identifier=%s', identifier);+ return;+ }++ const normalizedAuthor = this.normalizeAuthorField(data.author);+ const assistant = {+ author: normalizedAuthor || (data.ownerId !== null ? `User${data.ownerId}` : 'Unknown'),+ avatar: data.avatar || normalizedAuthor || '',+ category: (data as any).category || 'general',+ config: data.config || {},+ createdAt: (data as any).createdAt,+ currentVersion: data.version,+ description: (data as any).description || data.summary,+ examples: Array.isArray((data as any).examples)+ ? (data as any).examples.map((example: any) => ({+ content: typeof example === 'string' ? example : example.content || '',+ role: example.role || 'user',+ }))+ : [],+ homepage:+ (data as any).homepage ||+ `https://lobehub.com/discover/assistant/${(data as any).identifier}`,+ identifier: (data as any).identifier,+ knowledgeCount:+ (data.config as any)?.knowledgeBases?.length || (data as any).knowledgeCount || 0,+ pluginCount: (data.config as any)?.plugins?.length || (data as any).pluginCount || 0,+ readme: data.documentationUrl || '',+ schemaVersion: 1,+ status: data.status,+ summary: data.summary || '',+ systemRole: (data.config as any)?.systemRole || '',+ tags: data.tags || [],+ title: (data as any).name || (data as any).identifier,+ tokenUsage: data.tokenUsage || 0,+ versions:+ // @ts-ignore+ data.versions?.map((item) => ({+ createdAt: (item as any).createdAt || item.updatedAt,+ isLatest: item.isLatest,+ isValidated: item.isValidated,+ status: item.status as any,+ version: item.version,+ })) || [],+ };++ // Get related assistants+ const list = await this.getAssistantList({+ category: assistant.category,+ locale,+ page: 1,+ pageSize: 7,+ source,+ });++ const result = {+ ...assistant,+ related: list.items.filter((item) => item.identifier !== assistant.identifier).slice(0, 6),+ };++ log('getAssistantDetail: returning assistant with %d related items', result.related.length);+ return result;+ } catch (error) {+ log('getAssistantDetail: error fetching from market SDK: %O', error);+ return;+ }+ };++ getAssistantIdentifiers = async (+ params: { source?: AssistantMarketSource } = {},+ ): Promise<IdentifiersResponse> => {+ log('getAssistantIdentifiers: fetching identifiers with params=%O', params);+ if (this.isLegacySource(params.source)) {+ return this.legacyGetAssistantIdentifiers();+ }++ try {+ // @ts-ignore+ const identifiers = await this.market.agents.getPublishedIdentifiers();+ // @ts-ignore+ const result = identifiers.map((item) => ({+ identifier: item.id,+ lastModified: item.lastModified,+ }));+ log('getAssistantIdentifiers: returning %d identifiers from market SDK', result.length);+ return result;+ } catch (error) {+ log('getAssistantIdentifiers: error fetching from market SDK: %O', error);+ return [];+ }+ };++ getAssistantList = async (params: AssistantQueryParams = {}): Promise<AssistantListResponse> => {+ log('getAssistantList: params=%O', params);+ const { source, ...rest } = params;+ if (this.isLegacySource(source)) {+ return this.legacyGetAssistantList(rest);+ }++ const {+ locale,+ category,+ order = 'desc',+ page = 1,+ pageSize = 20,+ q,+ sort = AssistantSorts.CreatedAt,+ ownerId,+ } = rest;++ try {+ const normalizedLocale = normalizeLocale(locale);++ let apiSort: 'createdAt' | 'updatedAt' | 'name' = 'createdAt';+ switch (sort) {+ case AssistantSorts.Identifier:+ case AssistantSorts.Title: {+ apiSort = 'name';+ break;+ }+ case AssistantSorts.CreatedAt:+ case AssistantSorts.MyOwn: {+ apiSort = 'createdAt';+ break;+ }+ default: {+ apiSort = 'createdAt';+ }+ }++ // @ts-ignore+ const data = await this.market.agents.getAgentList({+ category,+ locale: normalizedLocale,+ order,+ ownerId,+ page,+ pageSize,+ q,+ sort: apiSort,+ status: 'published',+ visibility: 'public',+ });++ const transformedItems: DiscoverAssistantItem[] = (data.items || []).map((item: any) => {+ const normalizedAuthor = this.normalizeAuthorField(item.author);+ return {+ author: normalizedAuthor || (item.ownerId !== null ? `User${item.ownerId}` : 'Unknown'),+ avatar: item.avatar || normalizedAuthor || '',+ category: item.category || 'general',+ config: item.config || {},+ createdAt: item.createdAt || item.updatedAt || new Date().toISOString(),+ description: item.description || item.summary || '',+ homepage: item.homepage || `https://lobehub.com/discover/assistant/${item.identifier}`,+ identifier: item.identifier,+ knowledgeCount: item.knowledgeCount ?? item.config?.knowledgeBases?.length ?? 0,+ pluginCount: item.pluginCount ?? item.config?.plugins?.length ?? 0,+ schemaVersion: item.schemaVersion ?? 1,+ tags: item.tags || [],+ title: item.name || item.identifier,+ tokenUsage: item.tokenUsage || 0,+ };+ });++ const result: AssistantListResponse = {+ currentPage: data.currentPage || page,+ items: transformedItems,+ pageSize: data.pageSize || pageSize,+ totalCount: data.totalCount || 0,+ totalPages: data.totalPages || 0,+ };++ log(+ 'getAssistantList: returning page %d/%d with %d items from market SDK',+ result.currentPage,+ result.totalPages,+ result.items.length,+ );+ return result;+ } catch (error) {+ log('getAssistantList: error fetching from market SDK: %O', error);+ return {+ currentPage: page,+ items: [],+ pageSize,+ totalCount: 0,+ totalPages: 0,+ };+ }+ };+// ============================== MCP Market ==============================getMcpCategories = async (params: CategoryListQuery = {}): Promise<CategoryItem[]> => {diff --git a/src/server/sitemap.ts b/src/server/sitemap.tsindex 2f035896fed..27088d17ad3 100644--- a/src/server/sitemap.ts+++ b/src/server/sitemap.ts@@ -210,20 +210,24 @@ export class Sitemap {const endIndex = startIndex + ITEMS_PER_PAGE;const pageAssistants = list.slice(startIndex, endIndex);- const sitmap = pageAssistants.map((item) =>- this._genSitemap(urlJoin('/discover/assistant', item.identifier), {- lastModified: item?.lastModified || LAST_MODIFIED,- }),- );+ const sitmap = pageAssistants+ .filter((item) => item.identifier) // 过滤掉 identifier 为空的项目+ .map((item) =>+ this._genSitemap(urlJoin('/discover/assistant', item.identifier), {+ lastModified: item?.lastModified || LAST_MODIFIED,+ }),+ );return flatten(sitmap);}// 如果没有指定页数,返回所有(向后兼容)- const sitmap = list.map((item) =>- this._genSitemap(urlJoin('/discover/assistant', item.identifier), {- lastModified: item?.lastModified || LAST_MODIFIED,- }),- );+ const sitmap = list+ .filter((item) => item.identifier) // 过滤掉 identifier 为空的项目+ .map((item) =>+ this._genSitemap(urlJoin('/discover/assistant', item.identifier), {+ lastModified: item?.lastModified || LAST_MODIFIED,+ }),+ );return flatten(sitmap);}@@ -235,20 +239,24 @@ export class Sitemap {const endIndex = startIndex + ITEMS_PER_PAGE;const pagePlugins = list.slice(startIndex, endIndex);- const sitmap = pagePlugins.map((item) =>- this._genSitemap(urlJoin('/discover/plugin', item.identifier), {- lastModified: item?.lastModified || LAST_MODIFIED,- }),- );+ const sitmap = pagePlugins+ .filter((item) => item.identifier) // 过滤掉 identifier 为空的项目+ .map((item) =>+ this._genSitemap(urlJoin('/discover/plugin', item.identifier), {+ lastModified: item?.lastModified || LAST_MODIFIED,+ }),+ );return flatten(sitmap);}// 如果没有指定页数,返回所有(向后兼容)- const sitmap = list.map((item) =>- this._genSitemap(urlJoin('/discover/plugin', item.identifier), {- lastModified: item?.lastModified || LAST_MODIFIED,- }),- );+ const sitmap = list+ .filter((item) => item.identifier) // 过滤掉 identifier 为空的项目+ .map((item) =>+ this._genSitemap(urlJoin('/discover/plugin', item.identifier), {+ lastModified: item?.lastModified || LAST_MODIFIED,+ }),+ );return flatten(sitmap);}@@ -260,30 +268,36 @@ export class Sitemap {const endIndex = startIndex + ITEMS_PER_PAGE;const pageModels = list.slice(startIndex, endIndex);- const sitmap = pageModels.map((item) =>- this._genSitemap(urlJoin('/discover/model', item.identifier), {- lastModified: item?.lastModified || LAST_MODIFIED,- }),- );+ const sitmap = pageModels+ .filter((item) => item.identifier) // 过滤掉 identifier 为空的项目+ .map((item) =>+ this._genSitemap(urlJoin('/discover/model', item.identifier), {+ lastModified: item?.lastModified || LAST_MODIFIED,+ }),+ );return flatten(sitmap);}// 如果没有指定页数,返回所有(向后兼容)- const sitmap = list.map((item) =>- this._genSitemap(urlJoin('/discover/model', item.identifier), {- lastModified: item?.lastModified || LAST_MODIFIED,- }),- );+ const sitmap = list+ .filter((item) => item.identifier) // 过滤掉 identifier 为空的项目+ .map((item) =>+ this._genSitemap(urlJoin('/discover/model', item.identifier), {+ lastModified: item?.lastModified || LAST_MODIFIED,+ }),+ );return flatten(sitmap);}async getProviders(): Promise<MetadataRoute.Sitemap> {const list = await this.discoverService.getProviderIdentifiers();- const sitmap = list.map((item) =>- this._genSitemap(urlJoin('/discover/provider', item.identifier), {- lastModified: item?.lastModified || LAST_MODIFIED,- }),- );+ const sitmap = list+ .filter((item) => item.identifier) // 过滤掉 identifier 为空的项目+ .map((item) =>+ this._genSitemap(urlJoin('/discover/provider', item.identifier), {+ lastModified: item?.lastModified || LAST_MODIFIED,+ }),+ );return flatten(sitmap);}diff --git a/src/services/_url.ts b/src/services/_url.tsindex e545aff9fb7..68f9d57b556 100644--- a/src/services/_url.ts+++ b/src/services/_url.ts@@ -1,6 +1,5 @@/* eslint-disable sort-keys-fix/sort-keys-fix */-export const API_ENDPOINTS = {oauth: '/api/auth',@@ -30,3 +29,18 @@ export const API_ENDPOINTS = {edge: '/webapi/tts/edge',microsoft: '/webapi/tts/microsoft',};++export const MARKET_OIDC_ENDPOINTS = {+ auth: '/lobehub-oidc/auth',+ token: '/market/oidc/token',+ userinfo: '/market/oidc/userinfo',+ handoff: '/market/oidc/handoff',+ desktopCallback: '/lobehub-oidc/callback/desktop',+};++export const MARKET_ENDPOINTS = {+ base: '/market',+ createAgent: '/market/agent/create',+ getAgentDetail: (identifier: string) => `/market/agent/${encodeURIComponent(identifier)}`,+ createAgentVersion: '/market/agent/versions/create',+};diff --git a/src/services/discover.ts b/src/services/discover.tsindex 617272bf10d..d98f321d20c 100644--- a/src/services/discover.ts+++ b/src/services/discover.ts@@ -7,6 +7,7 @@ import { useUserStore } from '@/store/user';import { preferenceSelectors } from '@/store/user/selectors';import {AssistantListResponse,+ AssistantMarketSource,AssistantQueryParams,DiscoverAssistantDetail,DiscoverMcpDetail,@@ -30,27 +31,37 @@ class DiscoverService {private _isRetrying = false;// ============================== Assistant Market ==============================- getAssistantCategories = async (params: CategoryListQuery = {}): Promise<CategoryItem[]> => {+ getAssistantCategories = async (+ params: CategoryListQuery & { source?: AssistantMarketSource } = {},+ ): Promise<CategoryItem[]> => {const locale = globalHelpers.getCurrentLanguage();+ const { source, ...rest } = params;return lambdaClient.market.getAssistantCategories.query({- ...params,+ ...rest,locale,+ source,});};getAssistantDetail = async (params: {identifier: string;locale?: string;+ source?: AssistantMarketSource;+ version?: string;}): Promise<DiscoverAssistantDetail | undefined> => {const locale = globalHelpers.getCurrentLanguage();return lambdaClient.market.getAssistantDetail.query({- ...params,+ identifier: params.identifier,locale,+ source: params.source,+ version: params.version,});};- getAssistantIdentifiers = async (): Promise<IdentifiersResponse> => {- return lambdaClient.market.getAssistantIdentifiers.query();+ getAssistantIdentifiers = async (+ params: { source?: AssistantMarketSource } = {},+ ): Promise<IdentifiersResponse> => {+ return lambdaClient.market.getAssistantIdentifiers.query(params);};getAssistantList = async (params: AssistantQueryParams = {}): Promise<AssistantListResponse> => {diff --git a/src/services/electron/remoteServer.ts b/src/services/electron/remoteServer.tsindex e697de23e61..b9fd0b82aac 100644--- a/src/services/electron/remoteServer.ts+++ b/src/services/electron/remoteServer.ts@@ -1,4 +1,4 @@-import { DataSyncConfig, dispatch } from '@lobechat/electron-client-ipc';+import { DataSyncConfig, MarketAuthorizationParams, dispatch } from '@lobechat/electron-client-ipc';class RemoteServerService {/**@@ -28,6 +28,13 @@ class RemoteServerService {requestAuthorization = async (config: DataSyncConfig) => {return dispatch('requestAuthorization', config);};++ /**+ * 请求 Market 授权+ */+ requestMarketAuthorization = async (params: MarketAuthorizationParams) => {+ return dispatch('requestMarketAuthorization', params);+ };}export const remoteServerService = new RemoteServerService();diff --git a/src/services/marketApi.ts b/src/services/marketApi.tsnew file mode 100644index 00000000000..eda1f9cf100--- /dev/null+++ b/src/services/marketApi.ts@@ -0,0 +1,124 @@+import { AgentItemDetail } from '@lobehub/market-sdk';++import { MARKET_ENDPOINTS } from '@/services/_url';++export class MarketApiService {+ private accessToken?: string;++ // eslint-disable-next-line no-undef+ private async request<T>(endpoint: string, init?: RequestInit): Promise<T> {+ const headers = new Headers(init?.headers);++ if (init?.body && !headers.has('content-type')) {+ headers.set('content-type', 'application/json');+ }++ if (this.accessToken && !headers.has('authorization')) {+ headers.set('authorization', `Bearer ${this.accessToken}`);+ }++ const response = await fetch(endpoint, {+ ...init,+ credentials: init?.credentials ?? 'same-origin',+ headers,+ });++ if (!response.ok) {+ let message = 'Unknown error';++ try {+ const errorBody = await response.json();+ message = errorBody?.message ?? message;+ } catch {+ message = await response.text();+ }++ throw new Error(message || 'Market request failed');+ }++ if (response.status === 204) {+ return undefined as T;+ }++ return (await response.json()) as T;+ }++ setAccessToken(token: string) {+ this.accessToken = token;+ }+ // Create new agent+ async createAgent(agentData: {+ homepage?: string;+ identifier: string;+ isFeatured?: boolean;+ name: string;+ status?: 'published' | 'unpublished' | 'archived' | 'deprecated';+ tokenUsage?: number;+ visibility?: 'public' | 'private' | 'internal';+ }): Promise<AgentItemDetail> {+ return this.request(MARKET_ENDPOINTS.createAgent, {+ body: JSON.stringify(agentData),+ method: 'POST',+ });+ }++ // Get agent detail by identifier+ async getAgentDetail(identifier: string): Promise<AgentItemDetail> {+ return this.request(MARKET_ENDPOINTS.getAgentDetail(identifier), {+ method: 'GET',+ });+ }++ // Check if agent exists (returns true if exists, false if not)+ async checkAgentExists(identifier: string): Promise<boolean> {+ try {+ await this.getAgentDetail(identifier);+ return true;+ } catch {+ return false;+ }+ }++ // Create agent version+ async createAgentVersion(versionData: {+ a2aProtocolVersion?: string;+ avatar?: string;+ category?: string;+ changelog?: string;+ config?: Record<string, any>;+ defaultInputModes?: string[];+ defaultOutputModes?: string[];+ description?: string;+ documentationUrl?: string;+ extensions?: Record<string, any>[];+ hasPushNotifications?: boolean;+ hasStateTransitionHistory?: boolean;+ hasStreaming?: boolean;+ identifier: string;+ interfaces?: Record<string, any>[];+ name?: string;+ preferredTransport?: string;+ providerId?: number;+ securityRequirements?: Record<string, any>[];+ securitySchemes?: Record<string, any>;+ setAsCurrent?: boolean;+ summary?: string;+ supportsAuthenticatedExtendedCard?: boolean;+ tokenUsage?: number;+ url?: string;+ }): Promise<AgentItemDetail> {+ const { identifier, ...rest } = versionData;+ const targetIdentifier = identifier;+ if (!targetIdentifier) throw new Error('Identifier is required');++ return this.request(MARKET_ENDPOINTS.createAgentVersion, {+ body: JSON.stringify({+ identifier: targetIdentifier,+ ...rest,+ }),+ method: 'POST',+ });+ }+}++export const marketApiService = new MarketApiService();diff --git a/src/store/discover/slices/assistant/action.ts b/src/store/discover/slices/assistant/action.tsindex 808d9f55c35..4a8b5a9f379 100644--- a/src/store/discover/slices/assistant/action.ts+++ b/src/store/discover/slices/assistant/action.ts@@ -7,17 +7,24 @@ import { DiscoverStore } from '@/store/discover';import { globalHelpers } from '@/store/global/helpers';import {AssistantListResponse,+ AssistantMarketSource,AssistantQueryParams,DiscoverAssistantDetail,IdentifiersResponse,} from '@/types/discover';export interface AssistantAction {- useAssistantCategories: (params: CategoryListQuery) => SWRResponse<CategoryItem[]>;+ useAssistantCategories: (+ params: CategoryListQuery & { source?: AssistantMarketSource },+ ) => SWRResponse<CategoryItem[]>;useAssistantDetail: (params: {identifier: string;+ source?: AssistantMarketSource;+ version?: string;}) => SWRResponse<DiscoverAssistantDetail | undefined>;- useAssistantIdentifiers: () => SWRResponse<IdentifiersResponse>;+ useAssistantIdentifiers: (params?: {+ source?: AssistantMarketSource;+ }) => SWRResponse<IdentifiersResponse>;useAssistantList: (params?: AssistantQueryParams) => SWRResponse<AssistantListResponse>;}@@ -41,7 +48,9 @@ export const createAssistantSlice: StateCreator<useAssistantDetail: (params) => {const locale = globalHelpers.getCurrentLanguage();return useSWR(- ['assistant-details', locale, params.identifier].filter(Boolean).join('-'),+ ['assistant-details', locale, params.identifier, params.version, params.source]+ .filter(Boolean)+ .join('-'),async () => discoverService.getAssistantDetail(params),{revalidateOnFocus: false,@@ -49,10 +58,14 @@ export const createAssistantSlice: StateCreator<);},- useAssistantIdentifiers: () => {- return useSWR('assistant-identifiers', async () => discoverService.getAssistantIdentifiers(), {- revalidateOnFocus: false,- });+ useAssistantIdentifiers: (params) => {+ return useSWR(+ ['assistant-identifiers', params?.source].filter(Boolean).join('-') || 'assistant-identifiers',+ async () => discoverService.getAssistantIdentifiers(params),+ {+ revalidateOnFocus: false,+ },+ );},useAssistantList: (params = {}) => {