Skip to content

🤯 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.

fix: setting response error and other bugs (#12265)

Rdmclin212d0ec21d086
diff --git a/locales/ar/marketAuth.json b/locales/ar/marketAuth.json
index d2c50310078..30ec202d0f6 100644
--- a/locales/ar/marketAuth.json
+++ b/locales/ar/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "تم التفويض بنجاح! يمكنك الآن نشر وكيلك.",
"messages.success.upload": "تم التفويض بنجاح! يمكنك الآن نشر إصدار جديد.",
"profileSetup.cancel": "إلغاء",
+ "profileSetup.confirmChangeUserId.cancel": "إلغاء",
+ "profileSetup.confirmChangeUserId.confirm": "تغيير معرف المستخدم",
+ "profileSetup.confirmChangeUserId.description": "بمجرد التبديل إلى @{{newId}}، يمكن لأي شخص المطالبة بمعرفك القديم @{{oldId}} وستتوقف جميع الروابط الحالية إلى ملفك الشخصي عن العمل. لا يمكن التراجع عن هذا الإجراء. هل أنت متأكد أنك تريد المتابعة؟",
+ "profileSetup.confirmChangeUserId.title": "تغيير معرف المستخدم؟",
"profileSetup.descriptionEdit": "قم بتحديث معلومات ملفك الشخصي في المجتمع.",
"profileSetup.descriptionFirstTime": "قم بإعداد ملفك لإكمال ملفك الشخصي في المجتمع.",
"profileSetup.errors.fileTooLarge": "حجم الملف لا يمكن أن يتجاوز 2 ميغابايت",
diff --git a/locales/bg-BG/marketAuth.json b/locales/bg-BG/marketAuth.json
index 1b7d37ee7d5..a661cdac3d1 100644
--- a/locales/bg-BG/marketAuth.json
+++ b/locales/bg-BG/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Удостоверяването е успешно! Вече можете да публикувате своя агент.",
"messages.success.upload": "Удостоверяването е успешно! Вече можете да публикувате нова версия.",
"profileSetup.cancel": "Отказ",
+ "profileSetup.confirmChangeUserId.cancel": "Отказ",
+ "profileSetup.confirmChangeUserId.confirm": "Промени потребителското име",
+ "profileSetup.confirmChangeUserId.description": "След като преминете към @{{newId}}, всеки ще може да заеме старото ви потребителско име @{{oldId}} и всички съществуващи връзки към вашия профил ще спрат да работят. Това действие не може да бъде отменено. Сигурни ли сте, че искате да продължите?",
+ "profileSetup.confirmChangeUserId.title": "Промяна на потребителското име?",
"profileSetup.descriptionEdit": "Актуализирай информацията в профила си в общността.",
"profileSetup.descriptionFirstTime": "Настрой профила си, за да го завършиш.",
"profileSetup.errors.fileTooLarge": "Размерът на файла не може да надвишава 2MB",
diff --git a/locales/de-DE/marketAuth.json b/locales/de-DE/marketAuth.json
index ecf72f33847..f6a557ce5d1 100644
--- a/locales/de-DE/marketAuth.json
+++ b/locales/de-DE/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Autorisierung erfolgreich! Du kannst jetzt deinen Agenten veröffentlichen.",
"messages.success.upload": "Autorisierung erfolgreich! Du kannst jetzt eine neue Version veröffentlichen.",
"profileSetup.cancel": "Abbrechen",
+ "profileSetup.confirmChangeUserId.cancel": "Abbrechen",
+ "profileSetup.confirmChangeUserId.confirm": "Benutzer-ID ändern",
+ "profileSetup.confirmChangeUserId.description": "Sobald du zu @{{newId}} wechselst, kann jeder deine alte ID @{{oldId}} übernehmen und alle bestehenden Links zu deinem Profil werden ungültig. Dies kann nicht rückgängig gemacht werden. Bist du sicher, dass du fortfahren möchtest?",
+ "profileSetup.confirmChangeUserId.title": "Benutzer-ID ändern?",
"profileSetup.descriptionEdit": "Aktualisiere die Informationen deines Community-Profils.",
"profileSetup.descriptionFirstTime": "Richte dein Profil ein, um dein Community-Profil abzuschließen.",
"profileSetup.errors.fileTooLarge": "Dateigröße darf 2 MB nicht überschreiten",
diff --git a/locales/en-US/marketAuth.json b/locales/en-US/marketAuth.json
index 4e1a949e606..568b523919d 100644
--- a/locales/en-US/marketAuth.json
+++ b/locales/en-US/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Authorization successful! You can now publish your agent.",
"messages.success.upload": "Authorization successful! You can now publish a new version.",
"profileSetup.cancel": "Cancel",
+ "profileSetup.confirmChangeUserId.cancel": "Cancel",
+ "profileSetup.confirmChangeUserId.confirm": "Change User ID",
+ "profileSetup.confirmChangeUserId.description": "Once you switch to @{{newId}}, anyone can claim your old ID @{{oldId}} and all existing links to your profile will break. This can't be undone. Are you sure you want to continue?",
+ "profileSetup.confirmChangeUserId.title": "Change User ID?",
"profileSetup.descriptionEdit": "Update your community profile information.",
"profileSetup.descriptionFirstTime": "Set up your profile to complete your community profile.",
"profileSetup.errors.fileTooLarge": "File size cannot exceed 2MB",
diff --git a/locales/es-ES/marketAuth.json b/locales/es-ES/marketAuth.json
index e55ced4c527..854f14e12d9 100644
--- a/locales/es-ES/marketAuth.json
+++ b/locales/es-ES/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "¡Autorización exitosa! Ahora puedes publicar tu agente.",
"messages.success.upload": "¡Autorización exitosa! Ahora puedes publicar una nueva versión.",
"profileSetup.cancel": "Cancelar",
+ "profileSetup.confirmChangeUserId.cancel": "Cancelar",
+ "profileSetup.confirmChangeUserId.confirm": "Cambiar ID de usuario",
+ "profileSetup.confirmChangeUserId.description": "Una vez que cambies a @{{newId}}, cualquier persona podrá reclamar tu antiguo ID @{{oldId}} y todos los enlaces existentes a tu perfil dejarán de funcionar. Esta acción no se puede deshacer. ¿Estás seguro de que deseas continuar?",
+ "profileSetup.confirmChangeUserId.title": "¿Cambiar ID de usuario?",
"profileSetup.descriptionEdit": "Actualiza la información de tu perfil de comunidad.",
"profileSetup.descriptionFirstTime": "Configura tu perfil para completar tu perfil de comunidad.",
"profileSetup.errors.fileTooLarge": "El archivo no puede superar los 2MB",
diff --git a/locales/fa-IR/marketAuth.json b/locales/fa-IR/marketAuth.json
index 05056b79744..3f482a67d8b 100644
--- a/locales/fa-IR/marketAuth.json
+++ b/locales/fa-IR/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "احراز هویت موفقیت‌آمیز بود! اکنون می‌توانید عامل خود را منتشر کنید.",
"messages.success.upload": "احراز هویت موفقیت‌آمیز بود! اکنون می‌توانید نسخه جدیدی منتشر کنید.",
"profileSetup.cancel": "لغو",
+ "profileSetup.confirmChangeUserId.cancel": "لغو",
+ "profileSetup.confirmChangeUserId.confirm": "تغییر شناسه کاربری",
+ "profileSetup.confirmChangeUserId.description": "پس از تغییر به @{{newId}}، هر کسی می‌تواند شناسه قبلی شما @{{oldId}} را تصاحب کند و تمام پیوندهای موجود به پروفایل شما از کار خواهند افتاد. این اقدام قابل بازگشت نیست. آیا مطمئن هستید که می‌خواهید ادامه دهید؟",
+ "profileSetup.confirmChangeUserId.title": "تغییر شناسه کاربری؟",
"profileSetup.descriptionEdit": "اطلاعات پروفایل انجمن خود را به‌روزرسانی کنید.",
"profileSetup.descriptionFirstTime": "برای تکمیل پروفایل انجمن خود، پروفایل را تنظیم کنید.",
"profileSetup.errors.fileTooLarge": "حجم فایل نباید بیش از ۲ مگابایت باشد",
diff --git a/locales/fr-FR/marketAuth.json b/locales/fr-FR/marketAuth.json
index 861616eb4a0..0f3de375dec 100644
--- a/locales/fr-FR/marketAuth.json
+++ b/locales/fr-FR/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Autorisation réussie ! Vous pouvez maintenant publier votre agent.",
"messages.success.upload": "Autorisation réussie ! Vous pouvez maintenant publier une nouvelle version.",
"profileSetup.cancel": "Annuler",
+ "profileSetup.confirmChangeUserId.cancel": "Annuler",
+ "profileSetup.confirmChangeUserId.confirm": "Changer l'identifiant",
+ "profileSetup.confirmChangeUserId.description": "Une fois que vous passez à @{{newId}}, n'importe qui pourra réclamer votre ancien identifiant @{{oldId}} et tous les liens existants vers votre profil seront rompus. Cette action est irréversible. Êtes-vous sûr de vouloir continuer ?",
+ "profileSetup.confirmChangeUserId.title": "Changer l'identifiant ?",
"profileSetup.descriptionEdit": "Mettez à jour les informations de votre profil communautaire.",
"profileSetup.descriptionFirstTime": "Configurez votre profil pour compléter votre profil communautaire.",
"profileSetup.errors.fileTooLarge": "La taille du fichier ne peut pas dépasser 2 Mo",
diff --git a/locales/it-IT/marketAuth.json b/locales/it-IT/marketAuth.json
index 07bc92917e4..6dfe2e1046d 100644
--- a/locales/it-IT/marketAuth.json
+++ b/locales/it-IT/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Autorizzazione riuscita! Ora puoi pubblicare il tuo agente.",
"messages.success.upload": "Autorizzazione riuscita! Ora puoi pubblicare una nuova versione.",
"profileSetup.cancel": "Annulla",
+ "profileSetup.confirmChangeUserId.cancel": "Annulla",
+ "profileSetup.confirmChangeUserId.confirm": "Cambia ID utente",
+ "profileSetup.confirmChangeUserId.description": "Una volta passato a @{{newId}}, chiunque potrà reclamare il tuo vecchio ID @{{oldId}} e tutti i link esistenti al tuo profilo smetteranno di funzionare. Questa operazione è irreversibile. Sei sicuro di voler continuare?",
+ "profileSetup.confirmChangeUserId.title": "Cambiare ID utente?",
"profileSetup.descriptionEdit": "Aggiorna le informazioni del tuo profilo community.",
"profileSetup.descriptionFirstTime": "Configura il tuo profilo per completare il profilo della community.",
"profileSetup.errors.fileTooLarge": "La dimensione del file non può superare i 2MB",
diff --git a/locales/ja-JP/marketAuth.json b/locales/ja-JP/marketAuth.json
index bbde28e915c..0fa0796926b 100644
--- a/locales/ja-JP/marketAuth.json
+++ b/locales/ja-JP/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "認証に成功しました!アシスタントを公開できます。",
"messages.success.upload": "認証に成功しました!新しいバージョンを公開できます。",
"profileSetup.cancel": "キャンセル",
+ "profileSetup.confirmChangeUserId.cancel": "キャンセル",
+ "profileSetup.confirmChangeUserId.confirm": "ユーザーIDを変更",
+ "profileSetup.confirmChangeUserId.description": "@{{newId}} に変更すると、以前のID @{{oldId}} は他の人が取得できるようになり、あなたのプロフィールへの既存のリンクはすべて無効になります。この操作は元に戻せません。本当に続行しますか?",
+ "profileSetup.confirmChangeUserId.title": "ユーザーIDを変更しますか?",
"profileSetup.descriptionEdit": "コミュニティプロフィール情報を更新してください。",
"profileSetup.descriptionFirstTime": "プロフィールを設定して、コミュニティプロフィールの作成を完了しましょう。",
"profileSetup.errors.fileTooLarge": "ファイルサイズは2MBを超えることはできません",
diff --git a/locales/ko-KR/marketAuth.json b/locales/ko-KR/marketAuth.json
index 20849de4bbc..20a1063a182 100644
--- a/locales/ko-KR/marketAuth.json
+++ b/locales/ko-KR/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "인증 성공! 이제 도우미를 게시할 수 있습니다.",
"messages.success.upload": "인증 성공! 이제 새 버전을 게시할 수 있습니다.",
"profileSetup.cancel": "취소",
+ "profileSetup.confirmChangeUserId.cancel": "취소",
+ "profileSetup.confirmChangeUserId.confirm": "사용자 ID 변경",
+ "profileSetup.confirmChangeUserId.description": "@{{newId}}(으)로 전환하면, 다른 사람이 이전 ID인 @{{oldId}}를 사용할 수 있으며 기존 프로필 링크는 모두 작동하지 않게 됩니다. 이 작업은 되돌릴 수 없습니다. 계속하시겠습니까?",
+ "profileSetup.confirmChangeUserId.title": "사용자 ID를 변경하시겠습니까?",
"profileSetup.descriptionEdit": "커뮤니티 프로필 정보를 업데이트하세요.",
"profileSetup.descriptionFirstTime": "프로필을 설정하여 커뮤니티 프로필 생성을 완료하세요.",
"profileSetup.errors.fileTooLarge": "파일 크기는 2MB를 초과할 수 없습니다",
diff --git a/locales/nl-NL/marketAuth.json b/locales/nl-NL/marketAuth.json
index 2e9d891421e..965a31255bc 100644
--- a/locales/nl-NL/marketAuth.json
+++ b/locales/nl-NL/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Autorisatie geslaagd! Je kunt nu je agent publiceren.",
"messages.success.upload": "Autorisatie geslaagd! Je kunt nu een nieuwe versie publiceren.",
"profileSetup.cancel": "Annuleren",
+ "profileSetup.confirmChangeUserId.cancel": "Annuleren",
+ "profileSetup.confirmChangeUserId.confirm": "Gebruikers-ID wijzigen",
+ "profileSetup.confirmChangeUserId.description": "Zodra je overschakelt naar @{{newId}}, kan iedereen je oude ID @{{oldId}} claimen en zullen alle bestaande links naar je profiel niet meer werken. Dit kan niet ongedaan worden gemaakt. Weet je zeker dat je wilt doorgaan?",
+ "profileSetup.confirmChangeUserId.title": "Gebruikers-ID wijzigen?",
"profileSetup.descriptionEdit": "Werk je communityprofiel bij.",
"profileSetup.descriptionFirstTime": "Stel je profiel in om je communityprofiel te voltooien.",
"profileSetup.errors.fileTooLarge": "Bestandsgrootte mag niet groter zijn dan 2MB",
diff --git a/locales/pl-PL/marketAuth.json b/locales/pl-PL/marketAuth.json
index 4554cc6a77d..8a3851c50fb 100644
--- a/locales/pl-PL/marketAuth.json
+++ b/locales/pl-PL/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Autoryzacja zakończona sukcesem! Możesz teraz opublikować swojego agenta.",
"messages.success.upload": "Autoryzacja zakończona sukcesem! Możesz teraz opublikować nową wersję.",
"profileSetup.cancel": "Anuluj",
+ "profileSetup.confirmChangeUserId.cancel": "Anuluj",
+ "profileSetup.confirmChangeUserId.confirm": "Zmień identyfikator użytkownika",
+ "profileSetup.confirmChangeUserId.description": "Po przejściu na @{{newId}}, każdy będzie mógł przejąć Twój stary identyfikator @{{oldId}}, a wszystkie istniejące linki do Twojego profilu przestaną działać. Tej operacji nie można cofnąć. Czy na pewno chcesz kontynuować?",
+ "profileSetup.confirmChangeUserId.title": "Zmień identyfikator użytkownika?",
"profileSetup.descriptionEdit": "Zaktualizuj informacje w swoim profilu społecznościowym.",
"profileSetup.descriptionFirstTime": "Skonfiguruj swój profil, aby ukończyć tworzenie profilu społecznościowego.",
"profileSetup.errors.fileTooLarge": "Rozmiar pliku nie może przekraczać 2 MB",
diff --git a/locales/pt-BR/marketAuth.json b/locales/pt-BR/marketAuth.json
index f89bf939daa..11ca24ccf06 100644
--- a/locales/pt-BR/marketAuth.json
+++ b/locales/pt-BR/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Autorização bem-sucedida! Agora você pode publicar seu agente.",
"messages.success.upload": "Autorização bem-sucedida! Agora você pode publicar uma nova versão.",
"profileSetup.cancel": "Cancelar",
+ "profileSetup.confirmChangeUserId.cancel": "Cancelar",
+ "profileSetup.confirmChangeUserId.confirm": "Alterar ID de Usuário",
+ "profileSetup.confirmChangeUserId.description": "Depois que você mudar para @{{newId}}, qualquer pessoa poderá reivindicar seu antigo ID @{{oldId}} e todos os links existentes para o seu perfil deixarão de funcionar. Esta ação não pode ser desfeita. Tem certeza de que deseja continuar?",
+ "profileSetup.confirmChangeUserId.title": "Alterar ID de Usuário?",
"profileSetup.descriptionEdit": "Atualize as informações do seu perfil da comunidade.",
"profileSetup.descriptionFirstTime": "Configure seu perfil para completar seu perfil da comunidade.",
"profileSetup.errors.fileTooLarge": "O tamanho do arquivo não pode exceder 2MB",
diff --git a/locales/ru-RU/marketAuth.json b/locales/ru-RU/marketAuth.json
index ffc5ac61084..49075da35b5 100644
--- a/locales/ru-RU/marketAuth.json
+++ b/locales/ru-RU/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Авторизация прошла успешно! Теперь вы можете опубликовать своего агента.",
"messages.success.upload": "Авторизация прошла успешно! Теперь вы можете опубликовать новую версию.",
"profileSetup.cancel": "Отмена",
+ "profileSetup.confirmChangeUserId.cancel": "Отмена",
+ "profileSetup.confirmChangeUserId.confirm": "Изменить ID пользователя",
+ "profileSetup.confirmChangeUserId.description": "После перехода на @{{newId}} любой сможет занять ваш старый ID @{{oldId}}, и все существующие ссылки на ваш профиль перестанут работать. Это действие необратимо. Вы уверены, что хотите продолжить?",
+ "profileSetup.confirmChangeUserId.title": "Изменить ID пользователя?",
"profileSetup.descriptionEdit": "Обновите информацию своего профиля сообщества.",
"profileSetup.descriptionFirstTime": "Настройте профиль, чтобы завершить создание профиля сообщества.",
"profileSetup.errors.fileTooLarge": "Размер файла не должен превышать 2 МБ",
diff --git a/locales/tr-TR/marketAuth.json b/locales/tr-TR/marketAuth.json
index 67b5a9bdf05..f2bdae41df0 100644
--- a/locales/tr-TR/marketAuth.json
+++ b/locales/tr-TR/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Yetkilendirme başarılı! Artık ajanını yayınlayabilirsin.",
"messages.success.upload": "Yetkilendirme başarılı! Artık yeni bir sürüm yayınlayabilirsin.",
"profileSetup.cancel": "İptal",
+ "profileSetup.confirmChangeUserId.cancel": "İptal",
+ "profileSetup.confirmChangeUserId.confirm": "Kullanıcı Kimliğini Değiştir",
+ "profileSetup.confirmChangeUserId.description": "@{{newId}} kimliğine geçtiğinizde, eski kimliğiniz @{{oldId}} başkaları tarafından alınabilir ve profilinize ait tüm mevcut bağlantılar çalışmaz hale gelir. Bu işlem geri alınamaz. Devam etmek istediğinizden emin misiniz?",
+ "profileSetup.confirmChangeUserId.title": "Kullanıcı Kimliği Değiştirilsin mi?",
"profileSetup.descriptionEdit": "Topluluk profil bilgilerini güncelle.",
"profileSetup.descriptionFirstTime": "Topluluk profilini tamamlamak için profilini oluştur.",
"profileSetup.errors.fileTooLarge": "Dosya boyutu 2MB'ı geçemez",
diff --git a/locales/vi-VN/marketAuth.json b/locales/vi-VN/marketAuth.json
index 91759abd424..fe02e61249e 100644
--- a/locales/vi-VN/marketAuth.json
+++ b/locales/vi-VN/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "Xác thực thành công! Bạn có thể xuất bản agent của mình.",
"messages.success.upload": "Xác thực thành công! Bạn có thể xuất bản phiên bản mới.",
"profileSetup.cancel": "Hủy",
+ "profileSetup.confirmChangeUserId.cancel": "Hủy",
+ "profileSetup.confirmChangeUserId.confirm": "Thay đổi ID người dùng",
+ "profileSetup.confirmChangeUserId.description": "Khi bạn chuyển sang @{{newId}}, bất kỳ ai cũng có thể lấy ID cũ của bạn @{{oldId}} và tất cả các liên kết hiện tại đến hồ sơ của bạn sẽ bị hỏng. Hành động này không thể hoàn tác. Bạn có chắc chắn muốn tiếp tục không?",
+ "profileSetup.confirmChangeUserId.title": "Thay đổi ID người dùng?",
"profileSetup.descriptionEdit": "Cập nhật thông tin hồ sơ cộng đồng của bạn.",
"profileSetup.descriptionFirstTime": "Thiết lập hồ sơ để hoàn tất hồ sơ cộng đồng của bạn.",
"profileSetup.errors.fileTooLarge": "Kích thước tệp không được vượt quá 2MB",
diff --git a/locales/zh-CN/marketAuth.json b/locales/zh-CN/marketAuth.json
index ce9206bfea1..11856b60318 100644
--- a/locales/zh-CN/marketAuth.json
+++ b/locales/zh-CN/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "授权成功!现在可以发布助理了。",
"messages.success.upload": "授权成功!现在可以发布新版本了。",
"profileSetup.cancel": "取消",
+ "profileSetup.confirmChangeUserId.cancel": "取消",
+ "profileSetup.confirmChangeUserId.confirm": "确认修改",
+ "profileSetup.confirmChangeUserId.description": "切换到 @{{newId}} 后,其他人可以注册你的旧 ID @{{oldId}},已有的主页链接也会全部失效且无法恢复。确定要继续吗?",
+ "profileSetup.confirmChangeUserId.title": "确认修改用户 ID?",
"profileSetup.descriptionEdit": "更新你的社区个人资料信息。",
"profileSetup.descriptionFirstTime": "设置你的个人资料以完成社区档案创建。",
"profileSetup.errors.fileTooLarge": "文件大小不能超过 2MB",
diff --git a/locales/zh-TW/marketAuth.json b/locales/zh-TW/marketAuth.json
index 30125d3172a..d8518ddfa68 100644
--- a/locales/zh-TW/marketAuth.json
+++ b/locales/zh-TW/marketAuth.json
@@ -38,6 +38,10 @@
"messages.success.submit": "授權成功!現在可以發佈助手了。",
"messages.success.upload": "授權成功!現在可以發佈新版本了。",
"profileSetup.cancel": "取消",
+ "profileSetup.confirmChangeUserId.cancel": "取消",
+ "profileSetup.confirmChangeUserId.confirm": "變更使用者 ID",
+ "profileSetup.confirmChangeUserId.description": "一旦您切換至 @{{newId}},任何人都可以認領您原本的 ID @{{oldId}},且所有指向您個人檔案的現有連結將會失效。此操作無法還原。您確定要繼續嗎?",
+ "profileSetup.confirmChangeUserId.title": "要變更使用者 ID 嗎?",
"profileSetup.descriptionEdit": "更新你的社群個人資料資訊。",
"profileSetup.descriptionFirstTime": "設定你的個人資料以完成社群檔案建立。",
"profileSetup.errors.fileTooLarge": "檔案大小不能超過 2MB",
diff --git a/packages/database/src/repositories/home/index.ts b/packages/database/src/repositories/home/index.ts
index f58ebb6ab06..48a75bb9218 100644
--- a/packages/database/src/repositories/home/index.ts
+++ b/packages/database/src/repositories/home/index.ts
@@ -1,4 +1,4 @@
-import type { SidebarAgentItem, SidebarAgentListResponse, SidebarGroup } from '@lobechat/types';
+import { type SidebarAgentItem, type SidebarAgentListResponse, type SidebarGroup } from '@lobechat/types';
import { cleanObject } from '@lobechat/utils';
import { and, desc, eq, ilike, inArray, not, or } from 'drizzle-orm';
@@ -10,7 +10,7 @@ import {
sessionGroups,
sessions,
} from '../../schemas';
-import type { LobeChatDatabase } from '../../type';
+import { type LobeChatDatabase } from '../../type';
// Re-export types for backward compatibility
export type {
@@ -140,6 +140,7 @@ export class HomeRepository {
avatar: g.avatar ? g.avatar : (memberAvatarsMap.get(g.id) ?? null),
backgroundColor: g.avatar ? g.backgroundColor : null,
description: g.description,
+ groupAvatar: g.avatar,
groupId: g.groupId,
id: g.id,
pinned: g.pinned ?? false,
diff --git a/packages/types/src/home.ts b/packages/types/src/home.ts
index b2229430c3d..d8533df5132 100644
--- a/packages/types/src/home.ts
+++ b/packages/types/src/home.ts
@@ -27,6 +27,11 @@ export interface SidebarAgentItem {
*/
backgroundColor?: string | null;
description?: string | null;
+ /**
+ * Group's own avatar (emoji or uploaded image URL)
+ * Only present for chat groups (type === 'group')
+ */
+ groupAvatar?: string | null;
id: string;
pinned: boolean;
sessionId?: string | null;
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/Editing.tsx b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/Editing.tsx
index b3ca6925a6c..39b60f87615 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/Editing.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/Editing.tsx
@@ -1,60 +1,147 @@
-import { Flexbox, Input, Popover, stopPropagation } from '@lobehub/ui';
-import { memo, useCallback, useState } from 'react';
+import { type GroupMemberAvatar } from '@lobechat/types';
+import { Avatar, Block, Flexbox, Input, stopPropagation } from '@lobehub/ui';
+import { type InputRef, message, Popover } from 'antd';
+import { memo, useCallback, useEffect, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import EmojiPicker from '@/components/EmojiPicker';
+import GroupAvatar from '@/features/GroupAvatar';
+import { useIsDark } from '@/hooks/useIsDark';
+import { useFileStore } from '@/store/file';
+import { useGlobalStore } from '@/store/global';
+import { globalGeneralSelectors } from '@/store/global/selectors';
import { useHomeStore } from '@/store/home';
+const MAX_AVATAR_SIZE = 1024 * 1024;
+
interface EditingProps {
+ avatar?: string;
id: string;
+ memberAvatars?: GroupMemberAvatar[];
title: string;
toggleEditing: (visible?: boolean) => void;
}
-const Editing = memo<EditingProps>(({ id, title, toggleEditing }) => {
+const Editing = memo<EditingProps>(({ id, title, avatar, memberAvatars, toggleEditing }) => {
+ const { t } = useTranslation('setting');
+ const locale = useGlobalStore(globalGeneralSelectors.currentLanguage);
+
+ const isDarkMode = useIsDark();
+
const editing = useHomeStore((s) => s.groupRenamingId === id);
+ const uploadWithProgress = useFileStore((s) => s.uploadWithProgress);
const [newTitle, setNewTitle] = useState(title);
+ const [newAvatar, setNewAvatar] = useState<string | null | undefined>(avatar);
+ const [uploading, setUploading] = useState(false);
+
+ const inputRef = useRef<InputRef>(null);
+
+ useEffect(() => {
+ if (editing) {
+ const timer = setTimeout(() => {
+ inputRef.current?.focus();
+ }, 100);
+ return () => clearTimeout(timer);
+ }
+ }, [editing]);
const handleUpdate = useCallback(async () => {
- const hasChanges = newTitle && title !== newTitle;
+ const hasChanges = (newTitle && title !== newTitle) || newAvatar !== avatar;
if (hasChanges) {
try {
useHomeStore.getState().setGroupUpdatingId(id);
- await useHomeStore.getState().renameAgentGroup(id, newTitle);
+ await useHomeStore
+ .getState()
+ .renameAgentGroup(id, newTitle || title, newAvatar !== avatar ? newAvatar : undefined);
} finally {
useHomeStore.getState().setGroupUpdatingId(null);
}
}
toggleEditing(false);
- }, [newTitle, title, id, toggleEditing]);
+ }, [newTitle, newAvatar, title, avatar, id, toggleEditing]);
+
+ const handleAvatarUpload = useCallback(
+ async (file: File) => {
+ if (file.size > MAX_AVATAR_SIZE) {
+ message.error(t('settingAgent.avatar.sizeExceeded'));
+ return;
+ }
+
+ setUploading(true);
+ try {
+ const result = await uploadWithProgress({ file });
+ if (result?.url) {
+ setNewAvatar(result.url);
+ }
+ } finally {
+ setUploading(false);
+ }
+ },
+ [uploadWithProgress, t],
+ );
+
+ const handleAvatarDelete = useCallback(() => {
+ setNewAvatar(null);
+ }, []);
return (
<Popover
+ arrow={false}
open={editing}
+ overlayInnerStyle={{ padding: 4 }}
placement="bottomLeft"
trigger="click"
content={
- <Flexbox horizontal gap={4} style={{ width: 280 }} onClick={stopPropagation}>
+ <Flexbox horizontal gap={4} style={{ width: 320 }} onClick={stopPropagation}>
+ <EmojiPicker
+ allowUpload
+ allowDelete={!!newAvatar}
+ loading={uploading}
+ locale={locale}
+ shape={'square'}
+ value={newAvatar ?? undefined}
+ customRender={(avatarValue) => (
+ <Block
+ clickable
+ align={'center'}
+ height={36}
+ justify={'center'}
+ variant={isDarkMode ? 'filled' : 'outlined'}
+ width={36}
+ onClick={(e) => e.stopPropagation()}
+ >
+ {avatarValue ? (
+ <Avatar
+ emojiScaleWithBackground
+ avatar={avatarValue}
+ shape={'square'}
+ size={32}
+ />
+ ) : (
+ <GroupAvatar avatars={memberAvatars || []} size={32} />
+ )}
+ </Block>
+ )}
+ onChange={setNewAvatar}
+ onDelete={handleAvatarDelete}
+ onUpload={handleAvatarUpload}
+ />
<Input
- autoFocus
defaultValue={title}
+ ref={inputRef}
style={{ flex: 1 }}
onChange={(e) => setNewTitle(e.target.value)}
- onPressEnter={() => {
- handleUpdate();
- toggleEditing(false);
+ onPressEnter={() => handleUpdate()}
+ onKeyDown={(e) => {
+ if (e.key === 'Escape') toggleEditing(false);
}}
/>
</Flexbox>
}
- styles={{
- content: {
- padding: 4,
- },
- }}
onOpenChange={(open) => {
if (!open) handleUpdate();
- toggleEditing(open);
}}
>
<div />
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/index.tsx b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/index.tsx
index a0c62afe48b..abcce067e4f 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/index.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/index.tsx
@@ -24,7 +24,7 @@ interface GroupItemProps {
}
const GroupItem = memo<GroupItemProps>(({ item, style, className }) => {
- const { id, avatar, backgroundColor, title, pinned } = item;
+ const { id, avatar, backgroundColor, groupAvatar, title, pinned } = item;
const { t } = useTranslation('chat');
const openAgentInNewWindow = useGlobalStore((s) => s.openAgentInNewWindow);
@@ -124,7 +124,13 @@ const GroupItem = memo<GroupItemProps>(({ item, style, className }) => {
onDragStart={handleDragStart}
/>
</Link>
- <Editing id={id} title={displayTitle} toggleEditing={toggleEditing} />
+ <Editing
+ avatar={groupAvatar || undefined}
+ id={id}
+ memberAvatars={Array.isArray(avatar) ? avatar : undefined}
+ title={displayTitle}
+ toggleEditing={toggleEditing}
+ />
</>
);
});
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentItem/Editing.tsx b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentItem/Editing.tsx
index 2ce8a40f598..f1788ff64fc 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentItem/Editing.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentItem/Editing.tsx
@@ -1,13 +1,18 @@
-import { Avatar, Block, Flexbox, Input, Popover, stopPropagation } from '@lobehub/ui';
-import { memo, useCallback, useState } from 'react';
+import { DEFAULT_AVATAR } from '@lobechat/const';
+import { Flexbox, Input, stopPropagation } from '@lobehub/ui';
+import { type InputRef, message, Popover } from 'antd';
+import { memo, useCallback, useEffect, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import EmojiPicker from '@/components/EmojiPicker';
-import { useIsDark } from '@/hooks/useIsDark';
import { useAgentStore } from '@/store/agent';
+import { useFileStore } from '@/store/file';
import { useGlobalStore } from '@/store/global';
import { globalGeneralSelectors } from '@/store/global/selectors';
import { useHomeStore } from '@/store/home';
+const MAX_AVATAR_SIZE = 1024 * 1024;
+
interface EditingProps {
avatar?: string;
id: string;
@@ -16,15 +21,28 @@ interface EditingProps {
}
const Editing = memo<EditingProps>(({ id, title, avatar, toggleEditing }) => {
+ const { t } = useTranslation('setting');
const locale = useGlobalStore(globalGeneralSelectors.currentLanguage);
- const isDarkMode = useIsDark();
const editing = useHomeStore((s) => s.agentRenamingId === id);
+ const uploadWithProgress = useFileStore((s) => s.uploadWithProgress);
- const currentAvatar = avatar || '';
+ const currentAvatar = avatar || DEFAULT_AVATAR;
const [newTitle, setNewTitle] = useState(title);
const [newAvatar, setNewAvatar] = useState(currentAvatar);
+ const [uploading, setUploading] = useState(false);
+
+ const inputRef = useRef<InputRef>(null);
+
+ useEffect(() => {
+ if (editing) {
+ const timer = setTimeout(() => {
+ inputRef.current?.focus();
+ }, 100);
+ return () => clearTimeout(timer);
+ }
+ }, [editing]);
const handleUpdate = useCallback(async () => {
const hasChanges =
@@ -32,72 +50,80 @@ const Editing = memo<EditingProps>(({ id, title, avatar, toggleEditing }) => {
if (hasChanges) {
try {
- // Set loading state
useHomeStore.getState().setAgentUpdatingId(id);
const updates: { avatar?: string; title?: string } = {};
if (newTitle && title !== newTitle) updates.title = newTitle;
if (newAvatar && currentAvatar !== newAvatar) updates.avatar = newAvatar;
- // Use optimisticUpdateAgentMeta to update the specific agent's meta
await useAgentStore.getState().optimisticUpdateAgentMeta(id, updates);
-
- // Refresh agent list to update sidebar display (including updatedAt)
await useHomeStore.getState().refreshAgentList();
} finally {
- // Clear loading state
useHomeStore.getState().setAgentUpdatingId(null);
}
}
toggleEditing(false);
}, [newTitle, newAvatar, title, currentAvatar, id, toggleEditing]);
+ const handleAvatarUpload = useCallback(
+ async (file: File) => {
+ if (file.size > MAX_AVATAR_SIZE) {
+ message.error(t('settingAgent.avatar.sizeExceeded'));
+ return;
+ }
+
+ setUploading(true);
+ try {
+ const result = await uploadWithProgress({ file });
+ if (result?.url) {
+ setNewAvatar(result.url);
+ }
+ } finally {
+ setUploading(false);
+ }
+ },
+ [uploadWithProgress, t],
+ );
+
+ const handleAvatarDelete = useCallback(() => {
+ setNewAvatar(DEFAULT_AVATAR);
+ }, []);
+
return (
<Popover
+ arrow={false}
open={editing}
+ overlayInnerStyle={{ padding: 4 }}
placement="bottomLeft"
trigger="click"
content={
<Flexbox horizontal gap={4} style={{ width: 320 }} onClick={stopPropagation}>
<EmojiPicker
+ allowUpload
+ allowDelete={!!newAvatar && newAvatar !== DEFAULT_AVATAR}
+ loading={uploading}
locale={locale}
shape={'square'}
+ size={36}
value={newAvatar}
- customRender={(avatarValue) => (
- <Block
- clickable
- align={'center'}
- height={36}
- justify={'center'}
- variant={isDarkMode ? 'filled' : 'outlined'}
- width={36}
- onClick={stopPropagation}
- >
- <Avatar emojiScaleWithBackground avatar={avatarValue} shape={'square'} size={32} />
- </Block>
- )}
onChange={setNewAvatar}
+ onDelete={handleAvatarDelete}
+ onUpload={handleAvatarUpload}
/>
<Input
- autoFocus
defaultValue={title}
+ ref={inputRef}
style={{ flex: 1 }}
onChange={(e) => setNewTitle(e.target.value)}
- onPressEnter={() => {
- handleUpdate();
- toggleEditing(false);
+ onPressEnter={() => handleUpdate()}
+ onKeyDown={(e) => {
+ if (e.key === 'Escape') toggleEditing(false);
}}
/>
</Flexbox>
}
- styles={{
- content: {
- padding: 4,
- },
- }}
onOpenChange={(open) => {
if (!open) handleUpdate();
- toggleEditing(open);
}}
>
<div />
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Editing.tsx b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Editing.tsx
index 58f07668c69..8d3a0823f19 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Editing.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Editing.tsx
@@ -1,5 +1,6 @@
-import { Input, Popover, stopPropagation } from '@lobehub/ui';
-import { memo, useCallback, useState } from 'react';
+import { Input, stopPropagation } from '@lobehub/ui';
+import { type InputRef, Popover } from 'antd';
+import { memo, useCallback, useEffect, useRef, useState } from 'react';
import { useHomeStore } from '@/store/home';
@@ -16,14 +17,23 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
s.updateGroupName,
]);
+ const inputRef = useRef<InputRef>(null);
+
+ useEffect(() => {
+ if (editing) {
+ const timer = setTimeout(() => {
+ inputRef.current?.focus();
+ }, 100);
+ return () => clearTimeout(timer);
+ }
+ }, [editing]);
+
const handleUpdate = useCallback(async () => {
if (newName && name !== newName) {
try {
- // Set loading state
useHomeStore.getState().setGroupUpdatingId(id);
await updateGroupName(id, newName);
} finally {
- // Clear loading state
useHomeStore.getState().setGroupUpdatingId(null);
}
}
@@ -32,35 +42,24 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
return (
<Popover
+ arrow={false}
open={editing}
+ overlayInnerStyle={{ padding: 4, width: 320 }}
placement="bottomLeft"
trigger="click"
content={
<Input
- autoFocus
defaultValue={name}
+ ref={inputRef}
+ onBlur={() => handleUpdate()}
onChange={(e) => setNewName(e.target.value)}
onClick={stopPropagation}
- onBlur={() => {
- handleUpdate();
- toggleEditing(false);
- }}
- onPressEnter={() => {
- handleUpdate();
- toggleEditing(false);
+ onPressEnter={() => handleUpdate()}
+ onKeyDown={(e) => {
+ if (e.key === 'Escape') toggleEditing(false);
}}
/>
}
- styles={{
- content: {
- padding: 4,
- width: 320,
- },
- }}
- onOpenChange={(open) => {
- if (!open) handleUpdate();
- toggleEditing(open);
- }}
>
<div />
</Popover>
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/useDropdownMenu.tsx b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/useDropdownMenu.tsx
index 5f049fc1ccc..d79741daea2 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/useDropdownMenu.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/useDropdownMenu.tsx
@@ -27,7 +27,7 @@ export const useGroupDropdownMenu = ({
return useMemo(() => {
const createAgentItem = createAgentMenuItem({ groupId: id, isPinned });
- const createGroupChatItem = createGroupChatMenuItem();
+ const createGroupChatItem = createGroupChatMenuItem({ groupId: id });
const configItem = configGroupMenuItem(openConfigGroupModal);
const renameItem = toggleEditing ? renameGroupMenuItem(toggleEditing) : null;
const deleteItem = id ? deleteGroupMenuItem(id) : null;
diff --git a/src/app/[variants]/(main)/home/_layout/hooks/useCreateMenuItems.tsx b/src/app/[variants]/(main)/home/_layout/hooks/useCreateMenuItems.tsx
index d9cf3dd227b..8954e320f76 100644
--- a/src/app/[variants]/(main)/home/_layout/hooks/useCreateMenuItems.tsx
+++ b/src/app/[variants]/(main)/home/_layout/hooks/useCreateMenuItems.tsx
@@ -10,6 +10,7 @@ import useSWRMutation from 'swr/mutation';
import { useGroupTemplates } from '@/components/ChatGroupWizard/templates';
import { DEFAULT_CHAT_GROUP_CHAT_CONFIG } from '@/const/settings';
+import { type CreateAgentParams } from '@/services/agent';
import { type GroupMemberConfig } from '@/services/chatGroup';
import { chatGroupService } from '@/services/chatGroup';
import { useAgentStore } from '@/store/agent';
@@ -49,8 +50,8 @@ export const useCreateMenuItems = () => {
// SWR-based agent creation with auto navigation to profile
const { trigger: mutateAgent, isMutating: isMutatingAgent } = useSWRMutation(
'agent.createAgent',
- async () => {
- const result = await storeCreateAgent({});
+ async (_key: string, { arg }: { arg?: CreateAgentParams }) => {
+ const result = await storeCreateAgent(arg ?? {});
return result;
},
{
@@ -64,10 +65,11 @@ export const useCreateMenuItems = () => {
// SWR-based group creation with auto navigation to profile
const { trigger: mutateGroup, isMutating: isMutatingGroup } = useSWRMutation(
'group.createGroup',
- async () => {
+ async (_key: string, { arg }: { arg?: CreateAgentOptions }) => {
const groupId = await createGroup(
{
config: DEFAULT_CHAT_GROUP_CHAT_CONFIG,
+ groupId: arg?.groupId,
title: t('defaultGroupChat'),
},
[],
@@ -89,7 +91,7 @@ export const useCreateMenuItems = () => {
*/
const createAgent = useCallback(
async (options?: CreateAgentOptions) => {
- await mutateAgent();
+ await mutateAgent({ groupId: options?.groupId });
options?.onSuccess?.();
},
[mutateAgent],
@@ -197,22 +199,25 @@ export const useCreateMenuItems = () => {
/**
* Create empty group and navigate to profile
*/
- const createEmptyGroup = useCallback(async () => {
- await mutateGroup();
- }, [mutateGroup]);
+ const createEmptyGroup = useCallback(
+ async (options?: CreateAgentOptions) => {
+ await mutateGroup(options);
+ },
+ [mutateGroup],
+ );
/**
* Create group chat menu item
* Creates an empty group and navigates to its profile page
*/
const createGroupChatMenuItem = useCallback(
- (): ItemType => ({
+ (options?: CreateAgentOptions): ItemType => ({
icon: <Icon icon={GroupBotSquareIcon} />,
key: 'newGroupChat',
label: t('newGroupChat'),
onClick: async (info) => {
info.domEvent?.stopPropagation();
- await createEmptyGroup();
+ await createEmptyGroup(options);
},
}),
[t, createEmptyGroup],
diff --git a/src/app/[variants]/(main)/settings/common/features/Common/Common.tsx b/src/app/[variants]/(main)/settings/common/features/Common/Common.tsx
index 7b2f3f50d62..95d98adc2f7 100644
--- a/src/app/[variants]/(main)/settings/common/features/Common/Common.tsx
+++ b/src/app/[variants]/(main)/settings/common/features/Common/Common.tsx
@@ -146,20 +146,21 @@ const Common = memo(() => {
children: (
<Flexbox horizontal justify={'flex-end'}>
<Select
+ allowClear
+ options={localeOptions}
placeholder={t('settingCommon.responseLanguage.placeholder')}
- options={[
- { label: t('settingCommon.responseLanguage.auto'), value: '' },
- ...localeOptions,
- ]}
+ value={general?.responseLanguage || undefined}
style={{
width: '50%',
}}
+ onChange={(value) => {
+ setSettings({ general: { responseLanguage: value ?? '' } });
+ }}
/>
</Flexbox>
),
desc: t('settingCommon.responseLanguage.desc'),
label: t('settingCommon.responseLanguage.title'),
- name: 'responseLanguage',
},
{
children: <Switch />,
diff --git a/src/layout/AuthProvider/MarketAuth/ProfileSetupModal.tsx b/src/layout/AuthProvider/MarketAuth/ProfileSetupModal.tsx
index 158f32bbd1f..46fdfa84311 100644
--- a/src/layout/AuthProvider/MarketAuth/ProfileSetupModal.tsx
+++ b/src/layout/AuthProvider/MarketAuth/ProfileSetupModal.tsx
@@ -3,7 +3,7 @@
import { SiGithub, SiX } from '@icons-pack/react-simple-icons';
import { Center, Flexbox, Icon, Input, Modal, Text, TextArea, Tooltip } from '@lobehub/ui';
import { type UploadProps } from 'antd';
-import { App, Form, Upload } from 'antd';
+import { App, Form, Modal as AntModal, Upload } from 'antd';
import { cssVar } from 'antd-style';
import { CircleHelp, Globe, ImagePlus, Trash2 } from 'lucide-react';
import { memo, useCallback, useEffect, useState } from 'react';
@@ -185,7 +185,7 @@ const ProfileSetupModal = memo<ProfileSetupModalProps>(
setBannerUrl(null);
}, []);
- const handleSubmit = useCallback(async () => {
+ const doSubmit = useCallback(async () => {
// 如果不是自动授权模式,需要校验 accessToken
if (!enableMarketTrustedClient && !accessToken) {
message.error(t('profileSetup.errors.notAuthenticated'));
@@ -264,6 +264,33 @@ const ProfileSetupModal = memo<ProfileSetupModalProps>(
t,
]);
+ const handleSubmit = useCallback(async () => {
+ try {
+ const values = await form.validateFields();
+ const oldUserName = userProfile?.userName;
+
+ // If userName changed and it's not first-time setup, show confirmation
+ if (!isFirstTimeSetup && oldUserName && values.userName !== oldUserName) {
+ AntModal.confirm({
+ cancelText: t('profileSetup.confirmChangeUserId.cancel'),
+ content: t('profileSetup.confirmChangeUserId.description', {
+ newId: values.userName,
+ oldId: oldUserName,
+ }),
+ okButtonProps: { danger: true },
+ okText: t('profileSetup.confirmChangeUserId.confirm'),
+ title: t('profileSetup.confirmChangeUserId.title'),
+ onOk: doSubmit,
+ });
+ return;
+ }
+
+ await doSubmit();
+ } catch {
+ // validateFields failed, form will show errors
+ }
+ }, [doSubmit, form, isFirstTimeSetup, t, userProfile?.userName]);
+
const handleCancel = useCallback(() => {
if (!isFirstTimeSetup) {
onClose();
diff --git a/src/locales/default/marketAuth.ts b/src/locales/default/marketAuth.ts
index d7916e332ec..e868c275532 100644
--- a/src/locales/default/marketAuth.ts
+++ b/src/locales/default/marketAuth.ts
@@ -82,6 +82,11 @@ export default {
'profileSetup.getStarted': 'Get Started',
'profileSetup.save': 'Save',
'profileSetup.socialLinks.title': 'Social Links',
+ 'profileSetup.confirmChangeUserId.cancel': 'Cancel',
+ 'profileSetup.confirmChangeUserId.confirm': 'Change User ID',
+ 'profileSetup.confirmChangeUserId.description':
+ "Once you switch to @{{newId}}, anyone can claim your old ID @{{oldId}} and all existing links to your profile will break. This can't be undone. Are you sure you want to continue?",
+ 'profileSetup.confirmChangeUserId.title': 'Change User ID?',
'profileSetup.success': 'Profile updated successfully',
'profileSetup.titleEdit': 'Edit Profile',
'profileSetup.titleFirstTime': 'Complete Your Profile',
diff --git a/src/store/home/slices/sidebarUI/action.ts b/src/store/home/slices/sidebarUI/action.ts
index 59477cc32c9..d3fb968a238 100644
--- a/src/store/home/slices/sidebarUI/action.ts
+++ b/src/store/home/slices/sidebarUI/action.ts
@@ -100,8 +100,12 @@ export class SidebarUIActionImpl {
await this.#get().refreshAgentList();
};
- renameAgentGroup = async (groupId: string, title: string): Promise<void> => {
- await chatGroupService.updateGroup(groupId, { title });
+ renameAgentGroup = async (
+ groupId: string,
+ title: string,
+ avatar?: string | null,
+ ): Promise<void> => {
+ await chatGroupService.updateGroup(groupId, { avatar, title });
await this.#get().refreshAgentList();
};