🤯 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(home): merge workspace quota into the usage widget (#19272)
Rdmclin242f6dd299de9
diff --git a/locales/ar/common.json b/locales/ar/common.jsonindex f7a7ddd8cd4..92df67b26be 100644--- a/locales/ar/common.json+++ b/locales/ar/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "استخدامي","userPanel.plans": "خطط الاشتراك","userPanel.profile": "الحساب",+ "userPanel.quota": "الحصة","userPanel.setting": "الإعدادات","userPanel.upgradePlan": "ترقية الخطة","userPanel.usages": "إحصائيات الاستخدام",diff --git a/locales/ar/home.json b/locales/ar/home.jsonindex 59fcbb03e88..b5209e3fc2f 100644--- a/locales/ar/home.json+++ b/locales/ar/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "المواضيع الأخيرة","dashboard.chat.running": "المواضيع الجارية","dashboard.customize.decrease": "تقليل {{label}}",- "dashboard.customize.entry": "تخصيص","dashboard.customize.group.agent": "الوكيل","dashboard.customize.group.listSize": "حجم القائمة","dashboard.customize.group.rail": "الشريط الجانبي",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "الاقتراحات","dashboard.customize.widget.tasks": "المهام","dashboard.customize.widget.unread": "غير مقروء",- "dashboard.customize.widget.usage": "الاستخدام",+ "dashboard.customize.widget.usage": "الاستخدام والحصة","dashboard.empty.plan.description": "قسّم النتيجة إلى خطوات واضحة","dashboard.empty.plan.prompt": "ساعدني في إنشاء خطة عملية لـ:","dashboard.empty.plan.title": "ضع خطة",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "رد للمتابعة في هذه المحادثة...","inbox.unread.title": "غير مقروء","inbox.unread.viewChat": "عرض المحادثة",- "inbox.usage.title": "الاستخدام",+ "inbox.usage.title": "الاستخدام والحصة","project.create": "مشروع جديد","project.deleteConfirm": "سيتم حذف هذا المشروع ولن يمكن استعادته. أكد للمتابعة.","recommendations.heteroAgent.cta": "أضف الوكيل",diff --git a/locales/bg-BG/common.json b/locales/bg-BG/common.jsonindex 711ffd8f4ac..78d81dcb707 100644--- a/locales/bg-BG/common.json+++ b/locales/bg-BG/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Моето използване","userPanel.plans": "Абонаментни планове","userPanel.profile": "Акаунт",+ "userPanel.quota": "Квота","userPanel.setting": "Настройки","userPanel.upgradePlan": "Надграждане на плана","userPanel.usages": "Статистика на използване",diff --git a/locales/bg-BG/home.json b/locales/bg-BG/home.jsonindex 8438fc8e97d..c37b3a1d8cf 100644--- a/locales/bg-BG/home.json+++ b/locales/bg-BG/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Скорошни теми","dashboard.chat.running": "Текущи теми","dashboard.customize.decrease": "Намалете {{label}}",- "dashboard.customize.entry": "Персонализиране","dashboard.customize.group.agent": "Агент","dashboard.customize.group.listSize": "Размер на списъка","dashboard.customize.group.rail": "Странична лента",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Предложения","dashboard.customize.widget.tasks": "Задачи","dashboard.customize.widget.unread": "Непрочетени",- "dashboard.customize.widget.usage": "Използване",+ "dashboard.customize.widget.usage": "Използване и Квота","dashboard.empty.plan.description": "Разделете резултата на ясни следващи стъпки","dashboard.empty.plan.prompt": "Помогнете ми да създам практичен план за:","dashboard.empty.plan.title": "Създайте план",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Отговорете, за да продължите този разговор...","inbox.unread.title": "Непрочетено","inbox.unread.viewChat": "Преглед на чата",- "inbox.usage.title": "Използване",+ "inbox.usage.title": "Използване и Квота","project.create": "Нов проект","project.deleteConfirm": "Този проект ще бъде изтрит и не може да бъде възстановен. Потвърдете, за да продължите.","recommendations.heteroAgent.cta": "Добавяне на агент",diff --git a/locales/de-DE/common.json b/locales/de-DE/common.jsonindex 724b3838820..02f21a7099c 100644--- a/locales/de-DE/common.json+++ b/locales/de-DE/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Meine Nutzung","userPanel.plans": "Abonnementpläne","userPanel.profile": "Konto",+ "userPanel.quota": "Kontingent","userPanel.setting": "Einstellungen","userPanel.upgradePlan": "Plan upgraden","userPanel.usages": "Nutzungsstatistiken",diff --git a/locales/de-DE/home.json b/locales/de-DE/home.jsonindex 8dc86ce8d70..09963551c12 100644--- a/locales/de-DE/home.json+++ b/locales/de-DE/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Aktuelle Themen","dashboard.chat.running": "Laufende Themen","dashboard.customize.decrease": "Verringern {{label}}",- "dashboard.customize.entry": "Anpassen","dashboard.customize.group.agent": "Agent","dashboard.customize.group.listSize": "Listengröße","dashboard.customize.group.rail": "Seitenleiste",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Vorschläge","dashboard.customize.widget.tasks": "Aufgaben","dashboard.customize.widget.unread": "Ungelesen",- "dashboard.customize.widget.usage": "Nutzung",+ "dashboard.customize.widget.usage": "Nutzung & Kontingent","dashboard.empty.plan.description": "Teilen Sie ein Ergebnis in klare nächste Schritte auf","dashboard.empty.plan.prompt": "Hilf mir, einen praktischen Plan zu erstellen für:","dashboard.empty.plan.title": "Einen Plan erstellen",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Antworten, um diesen Vorgang fortzusetzen…","inbox.unread.title": "Ungelesen","inbox.unread.viewChat": "Chat anzeigen",- "inbox.usage.title": "Nutzung",+ "inbox.usage.title": "Nutzung & Kontingent","project.create": "Neues Projekt","project.deleteConfirm": "Dieses Projekt wird gelöscht und kann nicht wiederhergestellt werden. Bestätigen Sie, um fortzufahren.","recommendations.heteroAgent.cta": "Agent hinzufügen",diff --git a/locales/en-US/common.json b/locales/en-US/common.jsonindex 0ce1ca4a589..17b536daaa4 100644--- a/locales/en-US/common.json+++ b/locales/en-US/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "My Usage","userPanel.plans": "Subscription Plans","userPanel.profile": "Account",+ "userPanel.quota": "Quota","userPanel.setting": "Settings","userPanel.upgradePlan": "Upgrade Plan","userPanel.usages": "Usage",diff --git a/locales/en-US/home.json b/locales/en-US/home.jsonindex d9100ca5f7c..6ac65b95733 100644--- a/locales/en-US/home.json+++ b/locales/en-US/home.json@@ -72,7 +72,7 @@"dashboard.customize.widget.suggestions": "Suggestions","dashboard.customize.widget.tasks": "Recent tasks","dashboard.customize.widget.unread": "Unread",- "dashboard.customize.widget.usage": "Usage",+ "dashboard.customize.widget.usage": "Usage & Quota","dashboard.empty.plan.description": "Break an outcome into clear next steps","dashboard.empty.plan.prompt": "Help me create a practical plan for:","dashboard.empty.plan.title": "Make a plan",@@ -133,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Reply to continue this run…","inbox.unread.title": "Unread","inbox.unread.viewChat": "View chat",- "inbox.usage.title": "Usage",+ "inbox.usage.title": "Usage & Quota","project.create": "New project","project.deleteConfirm": "This project will be deleted and can't be recovered. Confirm to continue.","recommendations.heteroAgent.cta": "Add Agent",diff --git a/locales/es-ES/common.json b/locales/es-ES/common.jsonindex 4680fe4b968..98e5e33981e 100644--- a/locales/es-ES/common.json+++ b/locales/es-ES/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Mi uso","userPanel.plans": "Planes de suscripción","userPanel.profile": "Cuenta",+ "userPanel.quota": "Cuota","userPanel.setting": "Configuración","userPanel.upgradePlan": "Actualizar Plan","userPanel.usages": "Estadísticas de uso",diff --git a/locales/es-ES/home.json b/locales/es-ES/home.jsonindex ff1d9cda545..51f3bba04ae 100644--- a/locales/es-ES/home.json+++ b/locales/es-ES/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Temas recientes","dashboard.chat.running": "Temas en curso","dashboard.customize.decrease": "Disminuir {{label}}",- "dashboard.customize.entry": "Personalizar","dashboard.customize.group.agent": "Agente","dashboard.customize.group.listSize": "Tamaño de la lista","dashboard.customize.group.rail": "Barra lateral",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Sugerencias","dashboard.customize.widget.tasks": "Tareas","dashboard.customize.widget.unread": "No leído",- "dashboard.customize.widget.usage": "Uso",+ "dashboard.customize.widget.usage": "Uso y cuota","dashboard.empty.plan.description": "Divide un resultado en pasos claros","dashboard.empty.plan.prompt": "Ayúdame a crear un plan práctico para:","dashboard.empty.plan.title": "Crear un plan",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Responde para continuar con esta conversación…","inbox.unread.title": "Sin leer","inbox.unread.viewChat": "Ver chat",- "inbox.usage.title": "Uso",+ "inbox.usage.title": "Uso y cuota","project.create": "Nuevo proyecto","project.deleteConfirm": "Este proyecto se eliminará y no se podrá recuperar. Confirma para continuar.","recommendations.heteroAgent.cta": "Agregar agente",diff --git a/locales/fa-IR/common.json b/locales/fa-IR/common.jsonindex 49182916a64..0dd209d2f60 100644--- a/locales/fa-IR/common.json+++ b/locales/fa-IR/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "استفاده من","userPanel.plans": "طرحهای اشتراک","userPanel.profile": "حساب کاربری",+ "userPanel.quota": "سهمیه","userPanel.setting": "تنظیمات","userPanel.upgradePlan": "ارتقاء طرح","userPanel.usages": "آمار استفاده",diff --git a/locales/fa-IR/home.json b/locales/fa-IR/home.jsonindex e1b59b25ef7..8702516a222 100644--- a/locales/fa-IR/home.json+++ b/locales/fa-IR/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "موضوعات اخیر","dashboard.chat.running": "موضوعات در حال اجرا","dashboard.customize.decrease": "کاهش {{label}}",- "dashboard.customize.entry": "سفارشیسازی","dashboard.customize.group.agent": "نماینده","dashboard.customize.group.listSize": "اندازه لیست","dashboard.customize.group.rail": "نوار کناری",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "پیشنهادات","dashboard.customize.widget.tasks": "وظایف","dashboard.customize.widget.unread": "خواندهنشده",- "dashboard.customize.widget.usage": "استفاده",+ "dashboard.customize.widget.usage": "استفاده و سهمیه","dashboard.empty.plan.description": "یک نتیجه را به مراحل واضح بعدی تقسیم کنید","dashboard.empty.plan.prompt": "به من کمک کنید یک برنامه عملی برای این موضوع ایجاد کنم:","dashboard.empty.plan.title": "یک برنامه بسازید",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "پاسخ دهید تا این مکالمه ادامه یابد…","inbox.unread.title": "خوانده نشده","inbox.unread.viewChat": "مشاهده چت",- "inbox.usage.title": "استفاده",+ "inbox.usage.title": "استفاده و سهمیه","project.create": "پروژه جدید","project.deleteConfirm": "این پروژه حذف خواهد شد و امکان بازیابی آن وجود ندارد. برای ادامه تأیید کنید.","recommendations.heteroAgent.cta": "افزودن عامل",diff --git a/locales/fr-FR/common.json b/locales/fr-FR/common.jsonindex 8132805227d..46a4b71f09a 100644--- a/locales/fr-FR/common.json+++ b/locales/fr-FR/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Mon utilisation","userPanel.plans": "Formules d'abonnement","userPanel.profile": "Compte",+ "userPanel.quota": "Quota","userPanel.setting": "Paramètres","userPanel.upgradePlan": "Mettre à niveau le plan","userPanel.usages": "Statistiques d'utilisation",diff --git a/locales/fr-FR/home.json b/locales/fr-FR/home.jsonindex 6dc85bf6b39..649212c0f58 100644--- a/locales/fr-FR/home.json+++ b/locales/fr-FR/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Sujets récents","dashboard.chat.running": "Sujets en cours","dashboard.customize.decrease": "Diminuer {{label}}",- "dashboard.customize.entry": "Personnaliser","dashboard.customize.group.agent": "Agent","dashboard.customize.group.listSize": "Taille de la liste","dashboard.customize.group.rail": "Barre latérale",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Suggestions","dashboard.customize.widget.tasks": "Tâches","dashboard.customize.widget.unread": "Non lus",- "dashboard.customize.widget.usage": "Utilisation",+ "dashboard.customize.widget.usage": "Utilisation et Quota","dashboard.empty.plan.description": "Divisez un objectif en étapes claires","dashboard.empty.plan.prompt": "Aidez-moi à créer un plan pratique pour :","dashboard.empty.plan.title": "Élaborer un plan",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Répondez pour continuer cette conversation…","inbox.unread.title": "Non lu","inbox.unread.viewChat": "Voir la discussion",- "inbox.usage.title": "Utilisation",+ "inbox.usage.title": "Utilisation et Quota","project.create": "Nouveau projet","project.deleteConfirm": "Ce projet sera supprimé et ne pourra pas être récupéré. Confirmez pour continuer.","recommendations.heteroAgent.cta": "Ajouter un agent",diff --git a/locales/it-IT/common.json b/locales/it-IT/common.jsonindex ee5ff47a22e..9a7c61b4bd7 100644--- a/locales/it-IT/common.json+++ b/locales/it-IT/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Il mio utilizzo","userPanel.plans": "Piani di abbonamento","userPanel.profile": "Account",+ "userPanel.quota": "Quota","userPanel.setting": "Impostazioni","userPanel.upgradePlan": "Aggiorna piano","userPanel.usages": "Statistiche di utilizzo",diff --git a/locales/it-IT/home.json b/locales/it-IT/home.jsonindex 4d536794d16..2a5649cdd1a 100644--- a/locales/it-IT/home.json+++ b/locales/it-IT/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Argomenti recenti","dashboard.chat.running": "Argomenti in corso","dashboard.customize.decrease": "Diminuisci {{label}}",- "dashboard.customize.entry": "Personalizza","dashboard.customize.group.agent": "Agente","dashboard.customize.group.listSize": "Dimensione elenco","dashboard.customize.group.rail": "Barra laterale",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Suggerimenti","dashboard.customize.widget.tasks": "Attività","dashboard.customize.widget.unread": "Non letti",- "dashboard.customize.widget.usage": "Utilizzo",+ "dashboard.customize.widget.usage": "Utilizzo e Quota","dashboard.empty.plan.description": "Scomponi un obiettivo in passaggi chiari","dashboard.empty.plan.prompt": "Aiutami a creare un piano pratico per:","dashboard.empty.plan.title": "Crea un piano",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Rispondi per continuare questa conversazione…","inbox.unread.title": "Non letti","inbox.unread.viewChat": "Visualizza chat",- "inbox.usage.title": "Utilizzo",+ "inbox.usage.title": "Utilizzo e Quota","project.create": "Nuovo progetto","project.deleteConfirm": "Questo progetto verrà eliminato e non potrà essere recuperato. Conferma per continuare.","recommendations.heteroAgent.cta": "Aggiungi Agente",diff --git a/locales/ja-JP/common.json b/locales/ja-JP/common.jsonindex 6bbb91e6d36..9a405b3298b 100644--- a/locales/ja-JP/common.json+++ b/locales/ja-JP/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "私の使用状況","userPanel.plans": "サブスクリプションプラン","userPanel.profile": "アカウント管理",+ "userPanel.quota": "クオータ","userPanel.setting": "アプリ設定","userPanel.upgradePlan": "プランをアップグレード","userPanel.usages": "使用統計",diff --git a/locales/ja-JP/home.json b/locales/ja-JP/home.jsonindex a2d1402b22f..0054fa6dc7b 100644--- a/locales/ja-JP/home.json+++ b/locales/ja-JP/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "最近のトピック","dashboard.chat.running": "進行中のトピック","dashboard.customize.decrease": "{{label}}を減らす",- "dashboard.customize.entry": "カスタマイズ","dashboard.customize.group.agent": "エージェント","dashboard.customize.group.listSize": "リストサイズ","dashboard.customize.group.rail": "サイドバー",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "提案","dashboard.customize.widget.tasks": "タスク","dashboard.customize.widget.unread": "未読",- "dashboard.customize.widget.usage": "使用状況",+ "dashboard.customize.widget.usage": "使用状況とクォータ","dashboard.empty.plan.description": "成果を明確な次のステップに分解する","dashboard.empty.plan.prompt": "実用的な計画を作成する手助けをしてください:","dashboard.empty.plan.title": "計画を立てる",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "返信してこのランを続行してください…","inbox.unread.title": "未読","inbox.unread.viewChat": "チャットを見る",- "inbox.usage.title": "使用状況",+ "inbox.usage.title": "使用状況とクォータ","project.create": "新しいプロジェクトを作成","project.deleteConfirm": "このプロジェクトは削除され、復元できません。続行するには確認してください。","recommendations.heteroAgent.cta": "エージェントを追加",diff --git a/locales/ko-KR/common.json b/locales/ko-KR/common.jsonindex fb49dd62f95..10e2bd60962 100644--- a/locales/ko-KR/common.json+++ b/locales/ko-KR/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "내 사용량","userPanel.plans": "구독 플랜","userPanel.profile": "계정 관리",+ "userPanel.quota": "할당량","userPanel.setting": "앱 설정","userPanel.upgradePlan": "플랜 업그레이드","userPanel.usages": "사용량 통계",diff --git a/locales/ko-KR/home.json b/locales/ko-KR/home.jsonindex b2509f74b56..0c011d04c26 100644--- a/locales/ko-KR/home.json+++ b/locales/ko-KR/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "최근 주제","dashboard.chat.running": "진행 중인 주제","dashboard.customize.decrease": "{{label}} 감소",- "dashboard.customize.entry": "사용자 정의","dashboard.customize.group.agent": "에이전트","dashboard.customize.group.listSize": "목록 크기","dashboard.customize.group.rail": "사이드바",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "제안","dashboard.customize.widget.tasks": "작업","dashboard.customize.widget.unread": "읽지 않음",- "dashboard.customize.widget.usage": "사용량",+ "dashboard.customize.widget.usage": "사용량 및 할당량","dashboard.empty.plan.description": "결과를 명확한 다음 단계로 나누세요","dashboard.empty.plan.prompt": "실용적인 계획을 세우는 데 도움을 주세요:","dashboard.empty.plan.title": "계획 세우기",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "이 실행을 계속하려면 답장하세요…","inbox.unread.title": "읽지 않음","inbox.unread.viewChat": "채팅 보기",- "inbox.usage.title": "사용량",+ "inbox.usage.title": "사용량 및 할당량","project.create": "새 프로젝트 만들기","project.deleteConfirm": "이 프로젝트는 삭제되며 복구할 수 없습니다. 계속하려면 확인하세요.","recommendations.heteroAgent.cta": "에이전트 추가",diff --git a/locales/nl-NL/common.json b/locales/nl-NL/common.jsonindex 21f9d7a5da0..e7d95277f7a 100644--- a/locales/nl-NL/common.json+++ b/locales/nl-NL/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Mijn gebruik","userPanel.plans": "Abonnementen","userPanel.profile": "Account",+ "userPanel.quota": "Quotum","userPanel.setting": "Instellingen","userPanel.upgradePlan": "Abonnement upgraden","userPanel.usages": "Gebruiksstatistieken",diff --git a/locales/nl-NL/home.json b/locales/nl-NL/home.jsonindex 91fae2634df..19da7e5caf6 100644--- a/locales/nl-NL/home.json+++ b/locales/nl-NL/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Recente onderwerpen","dashboard.chat.running": "Lopende onderwerpen","dashboard.customize.decrease": "Verlaag {{label}}",- "dashboard.customize.entry": "Aanpassen","dashboard.customize.group.agent": "Agent","dashboard.customize.group.listSize": "Lijstgrootte","dashboard.customize.group.rail": "Zijbalk",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Suggesties","dashboard.customize.widget.tasks": "Taken","dashboard.customize.widget.unread": "Ongelezen",- "dashboard.customize.widget.usage": "Gebruik",+ "dashboard.customize.widget.usage": "Gebruik & Quota","dashboard.empty.plan.description": "Splits een resultaat op in duidelijke volgende stappen","dashboard.empty.plan.prompt": "Help me een praktisch plan te maken voor:","dashboard.empty.plan.title": "Maak een plan",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Antwoord om deze sessie voort te zetten…","inbox.unread.title": "Ongelezen","inbox.unread.viewChat": "Bekijk chat",- "inbox.usage.title": "Gebruik",+ "inbox.usage.title": "Gebruik & Quota","project.create": "Nieuw project","project.deleteConfirm": "Dit project wordt verwijderd en kan niet worden hersteld. Bevestig om door te gaan.","recommendations.heteroAgent.cta": "Agent toevoegen",diff --git a/locales/pl-PL/common.json b/locales/pl-PL/common.jsonindex 3806f89e813..751bcabe5a2 100644--- a/locales/pl-PL/common.json+++ b/locales/pl-PL/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Moje użycie","userPanel.plans": "Plany subskrypcji","userPanel.profile": "Konto",+ "userPanel.quota": "Limit","userPanel.setting": "Ustawienia","userPanel.upgradePlan": "Ulepsz plan","userPanel.usages": "Statystyki użycia",diff --git a/locales/pl-PL/home.json b/locales/pl-PL/home.jsonindex 64461e2930b..efc8bda50aa 100644--- a/locales/pl-PL/home.json+++ b/locales/pl-PL/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Ostatnie tematy","dashboard.chat.running": "Trwające tematy","dashboard.customize.decrease": "Zmniejsz {{label}}",- "dashboard.customize.entry": "Dostosuj","dashboard.customize.group.agent": "Agent","dashboard.customize.group.listSize": "Rozmiar listy","dashboard.customize.group.rail": "Pasek boczny",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Sugestie","dashboard.customize.widget.tasks": "Zadania","dashboard.customize.widget.unread": "Nieprzeczytane",- "dashboard.customize.widget.usage": "Użycie",+ "dashboard.customize.widget.usage": "Użycie i Limit","dashboard.empty.plan.description": "Podziel wynik na jasne, kolejne kroki","dashboard.empty.plan.prompt": "Pomóż mi stworzyć praktyczny plan dla:","dashboard.empty.plan.title": "Stwórz plan",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Odpowiedz, aby kontynuować ten wątek…","inbox.unread.title": "Nieprzeczytane","inbox.unread.viewChat": "Zobacz czat",- "inbox.usage.title": "Użycie",+ "inbox.usage.title": "Użycie i Limit","project.create": "Nowy projekt","project.deleteConfirm": "Ten projekt zostanie usunięty i nie będzie można go odzyskać. Potwierdź, aby kontynuować.","recommendations.heteroAgent.cta": "Dodaj agenta",diff --git a/locales/pt-BR/common.json b/locales/pt-BR/common.jsonindex 9cfc592ccfa..c0064ce2c8c 100644--- a/locales/pt-BR/common.json+++ b/locales/pt-BR/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Meu Uso","userPanel.plans": "Planos de Assinatura","userPanel.profile": "Conta",+ "userPanel.quota": "Cota","userPanel.setting": "Configurações","userPanel.upgradePlan": "Atualizar Plano","userPanel.usages": "Estatísticas de Uso",diff --git a/locales/pt-BR/home.json b/locales/pt-BR/home.jsonindex 7e50ee5527d..817b604cbdc 100644--- a/locales/pt-BR/home.json+++ b/locales/pt-BR/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Tópicos recentes","dashboard.chat.running": "Tópicos em andamento","dashboard.customize.decrease": "Diminuir {{label}}",- "dashboard.customize.entry": "Personalizar","dashboard.customize.group.agent": "Agente","dashboard.customize.group.listSize": "Tamanho da lista","dashboard.customize.group.rail": "Barra lateral",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Sugestões","dashboard.customize.widget.tasks": "Tarefas","dashboard.customize.widget.unread": "Não lidos",- "dashboard.customize.widget.usage": "Uso",+ "dashboard.customize.widget.usage": "Uso e Cota","dashboard.empty.plan.description": "Divida um objetivo em etapas claras","dashboard.empty.plan.prompt": "Ajude-me a criar um plano prático para:","dashboard.empty.plan.title": "Crie um plano",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Responda para continuar esta conversa…","inbox.unread.title": "Não lido","inbox.unread.viewChat": "Ver chat",- "inbox.usage.title": "Uso",+ "inbox.usage.title": "Uso e Cota","project.create": "Novo projeto","project.deleteConfirm": "Este projeto será excluído e não poderá ser recuperado. Confirme para continuar.","recommendations.heteroAgent.cta": "Adicionar Agente",diff --git a/locales/ru-RU/common.json b/locales/ru-RU/common.jsonindex 740b0ad9e70..489232d40dd 100644--- a/locales/ru-RU/common.json+++ b/locales/ru-RU/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Мое использование","userPanel.plans": "Тарифные планы","userPanel.profile": "Аккаунт",+ "userPanel.quota": "Квота","userPanel.setting": "Настройки","userPanel.upgradePlan": "Обновить план","userPanel.usages": "Статистика использования",diff --git a/locales/ru-RU/home.json b/locales/ru-RU/home.jsonindex 1700ec22583..c48034a2e7b 100644--- a/locales/ru-RU/home.json+++ b/locales/ru-RU/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Недавние темы","dashboard.chat.running": "Активные темы","dashboard.customize.decrease": "Уменьшить {{label}}",- "dashboard.customize.entry": "Настроить","dashboard.customize.group.agent": "Агент","dashboard.customize.group.listSize": "Размер списка","dashboard.customize.group.rail": "Боковая панель",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Предложения","dashboard.customize.widget.tasks": "Задачи","dashboard.customize.widget.unread": "Непрочитанные",- "dashboard.customize.widget.usage": "Использование",+ "dashboard.customize.widget.usage": "Использование и квота","dashboard.empty.plan.description": "Разбейте результат на четкие следующие шаги","dashboard.empty.plan.prompt": "Помогите мне создать практический план для:","dashboard.empty.plan.title": "Составить план",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Ответьте, чтобы продолжить этот разговор…","inbox.unread.title": "Непрочитанные","inbox.unread.viewChat": "Просмотреть чат",- "inbox.usage.title": "Использование",+ "inbox.usage.title": "Использование и квота","project.create": "Новый проект","project.deleteConfirm": "Этот проект будет удален и не может быть восстановлен. Подтвердите, чтобы продолжить.","recommendations.heteroAgent.cta": "Добавить агента",diff --git a/locales/tr-TR/common.json b/locales/tr-TR/common.jsonindex 26e21a0da7b..ba4add7a72c 100644--- a/locales/tr-TR/common.json+++ b/locales/tr-TR/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Kullanımım","userPanel.plans": "Abonelik Planları","userPanel.profile": "Hesap",+ "userPanel.quota": "Kota","userPanel.setting": "Ayarlar","userPanel.upgradePlan": "Planı Yükselt","userPanel.usages": "Kullanım İstatistikleri",diff --git a/locales/tr-TR/home.json b/locales/tr-TR/home.jsonindex f1116fed77f..3713bd8d181 100644--- a/locales/tr-TR/home.json+++ b/locales/tr-TR/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Son konular","dashboard.chat.running": "Devam eden konular","dashboard.customize.decrease": "{{label}} Azalt",- "dashboard.customize.entry": "Özelleştir","dashboard.customize.group.agent": "Ajan","dashboard.customize.group.listSize": "Liste boyutu","dashboard.customize.group.rail": "Kenar Çubuğu",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Öneriler","dashboard.customize.widget.tasks": "Görevler","dashboard.customize.widget.unread": "Okunmamış",- "dashboard.customize.widget.usage": "Kullanım",+ "dashboard.customize.widget.usage": "Kullanım ve Kota","dashboard.empty.plan.description": "Bir sonucu net adımlara ayırın","dashboard.empty.plan.prompt": "Bana şu konuda pratik bir plan oluştur: ","dashboard.empty.plan.title": "Bir plan yap",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Bu çalışmaya devam etmek için yanıt verin…","inbox.unread.title": "Okunmamış","inbox.unread.viewChat": "Sohbeti görüntüle",- "inbox.usage.title": "Kullanım",+ "inbox.usage.title": "Kullanım ve Kota","project.create": "Yeni proje","project.deleteConfirm": "Bu proje silinecek ve geri alınamaz. Devam etmek için onaylayın.","recommendations.heteroAgent.cta": "Ajan Ekle",diff --git a/locales/vi-VN/common.json b/locales/vi-VN/common.jsonindex 72baa36c023..e65c2e2065d 100644--- a/locales/vi-VN/common.json+++ b/locales/vi-VN/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "Sử dụng của tôi","userPanel.plans": "Gói đăng ký","userPanel.profile": "Tài khoản",+ "userPanel.quota": "Hạn mức","userPanel.setting": "Cài đặt","userPanel.upgradePlan": "Nâng cấp gói","userPanel.usages": "Thống kê sử dụng",diff --git a/locales/vi-VN/home.json b/locales/vi-VN/home.jsonindex 4cae267aee5..849693381ae 100644--- a/locales/vi-VN/home.json+++ b/locales/vi-VN/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "Chủ đề gần đây","dashboard.chat.running": "Chủ đề đang hoạt động","dashboard.customize.decrease": "Giảm {{label}}",- "dashboard.customize.entry": "Tùy chỉnh","dashboard.customize.group.agent": "Đại lý","dashboard.customize.group.listSize": "Kích thước danh sách","dashboard.customize.group.rail": "Thanh bên",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "Gợi ý","dashboard.customize.widget.tasks": "Nhiệm vụ","dashboard.customize.widget.unread": "Chưa đọc",- "dashboard.customize.widget.usage": "Sử dụng",+ "dashboard.customize.widget.usage": "Sử dụng & Hạn mức","dashboard.empty.plan.description": "Chia nhỏ một kết quả thành các bước tiếp theo rõ ràng","dashboard.empty.plan.prompt": "Giúp tôi tạo một kế hoạch thực tế cho:","dashboard.empty.plan.title": "Lập kế hoạch",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "Trả lời để tiếp tục cuộc trò chuyện này…","inbox.unread.title": "Chưa đọc","inbox.unread.viewChat": "Xem trò chuyện",- "inbox.usage.title": "Sử dụng",+ "inbox.usage.title": "Sử dụng & Hạn mức","project.create": "Dự án mới","project.deleteConfirm": "Dự án này sẽ bị xóa và không thể khôi phục. Xác nhận để tiếp tục.","recommendations.heteroAgent.cta": "Thêm Agent",diff --git a/locales/zh-CN/common.json b/locales/zh-CN/common.jsonindex f800dabbd80..b1610cdec28 100644--- a/locales/zh-CN/common.json+++ b/locales/zh-CN/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "我的用量","userPanel.plans": "订阅方案","userPanel.profile": "账户管理",+ "userPanel.quota": "额度","userPanel.setting": "应用设置","userPanel.upgradePlan": "升级套餐","userPanel.usages": "用量",diff --git a/locales/zh-CN/home.json b/locales/zh-CN/home.jsonindex 630dda01094..2df528aea06 100644--- a/locales/zh-CN/home.json+++ b/locales/zh-CN/home.json@@ -72,7 +72,7 @@"dashboard.customize.widget.suggestions": "推荐","dashboard.customize.widget.tasks": "最近任务","dashboard.customize.widget.unread": "未读",- "dashboard.customize.widget.usage": "用量",+ "dashboard.customize.widget.usage": "用量与额度","dashboard.empty.plan.description": "把目标拆解为清晰、可执行的下一步","dashboard.empty.plan.prompt": "帮我为以下目标制定一份切实可行的计划:","dashboard.empty.plan.title": "制定计划",@@ -133,7 +133,7 @@"inbox.unread.followUpPlaceholder": "回复以继续这次运行…","inbox.unread.title": "未读","inbox.unread.viewChat": "查看对话",- "inbox.usage.title": "用量",+ "inbox.usage.title": "用量与额度","project.create": "新建项目","project.deleteConfirm": "此项目将被删除且无法恢复。确认继续操作。","recommendations.heteroAgent.cta": "添加助手",diff --git a/locales/zh-TW/common.json b/locales/zh-TW/common.jsonindex 2ca69025673..aee90f1468c 100644--- a/locales/zh-TW/common.json+++ b/locales/zh-TW/common.json@@ -569,6 +569,7 @@"userPanel.myUsage": "我的使用情況","userPanel.plans": "訂閱方案","userPanel.profile": "帳戶管理",+ "userPanel.quota": "配額","userPanel.setting": "應用設定","userPanel.upgradePlan": "升級方案","userPanel.usages": "用量統計",diff --git a/locales/zh-TW/home.json b/locales/zh-TW/home.jsonindex 298c453a233..22fe8e4012d 100644--- a/locales/zh-TW/home.json+++ b/locales/zh-TW/home.json@@ -48,7 +48,6 @@"dashboard.chat.recents": "最近的主題","dashboard.chat.running": "進行中的主題","dashboard.customize.decrease": "減少{{label}}",- "dashboard.customize.entry": "自訂","dashboard.customize.group.agent": "代理","dashboard.customize.group.listSize": "列表大小","dashboard.customize.group.rail": "側邊欄",@@ -73,7 +72,7 @@"dashboard.customize.widget.suggestions": "建議","dashboard.customize.widget.tasks": "任務","dashboard.customize.widget.unread": "未讀",- "dashboard.customize.widget.usage": "使用情況",+ "dashboard.customize.widget.usage": "使用情況與配額","dashboard.empty.plan.description": "將結果分解為清晰的下一步","dashboard.empty.plan.prompt": "幫我為以下內容制定一個實用的計劃:","dashboard.empty.plan.title": "制定計劃",@@ -134,7 +133,7 @@"inbox.unread.followUpPlaceholder": "回覆以繼續此流程…","inbox.unread.title": "未讀","inbox.unread.viewChat": "查看聊天",- "inbox.usage.title": "使用情況",+ "inbox.usage.title": "使用情況與配額","project.create": "新增專案","project.deleteConfirm": "此專案將被刪除且無法恢復。確認繼續。","recommendations.heteroAgent.cta": "新增代理",diff --git a/package.json b/package.jsonindex 063fcd5ac2c..441e09092c0 100644--- a/package.json+++ b/package.json@@ -309,7 +309,7 @@"@lobehub/analytics": "^1.6.4","@lobehub/charts": "^5.4.0","@lobehub/desktop-ipc-typings": "workspace:*",- "@lobehub/editor": "^4.23.1",+ "@lobehub/editor": "^4.26.1","@lobehub/icons": "^5.18.0","@lobehub/market-sdk": "0.41.0","@lobehub/tts": "^5.1.2",diff --git a/packages/locales/src/default/common.ts b/packages/locales/src/default/common.tsindex d45c85b925f..0ce9f8ed20c 100644--- a/packages/locales/src/default/common.ts+++ b/packages/locales/src/default/common.ts@@ -668,6 +668,7 @@ export default {'userPanel.moveGuide': 'The settings button has been moved here','userPanel.myUsage': 'My Usage','userPanel.plans': 'Subscription Plans',+ 'userPanel.quota': 'Quota','userPanel.profile': 'Account','userPanel.setting': 'Settings','userPanel.upgradePlan': 'Upgrade Plan',diff --git a/packages/locales/src/default/home.ts b/packages/locales/src/default/home.tsindex f7e8a5e4700..5c83f66efbf 100644--- a/packages/locales/src/default/home.ts+++ b/packages/locales/src/default/home.ts@@ -77,7 +77,7 @@ export default {'dashboard.customize.widget.suggestions': 'Suggestions','dashboard.customize.widget.tasks': 'Recent tasks','dashboard.customize.widget.unread': 'Unread',- 'dashboard.customize.widget.usage': 'Usage',+ 'dashboard.customize.widget.usage': 'Usage & Quota','dashboard.empty.plan.description': 'Break an outcome into clear next steps','dashboard.empty.plan.prompt': 'Help me create a practical plan for:','dashboard.empty.plan.title': 'Make a plan',@@ -137,7 +137,7 @@ export default {'inbox.unread.followUpPlaceholder': 'Reply to continue this run…','inbox.unread.title': 'Unread','inbox.unread.viewChat': 'View chat',- 'inbox.usage.title': 'Usage',+ 'inbox.usage.title': 'Usage & Quota','project.create': 'New project','project.deleteConfirm':"This project will be deleted and can't be recovered. Confirm to continue.",diff --git a/src/features/ChatInput/ActionBar/Tools/useControls.tsx b/src/features/ChatInput/ActionBar/Tools/useControls.tsxindex 5a9dc51a974..5af08eb191d 100644--- a/src/features/ChatInput/ActionBar/Tools/useControls.tsx+++ b/src/features/ChatInput/ActionBar/Tools/useControls.tsx@@ -1420,6 +1420,10 @@ export const useControls = ({ closeDropdown }: { closeDropdown?: () => void } =const isMcp = item?.runtimeType === 'mcp';const hasRealAvatar = !!item?.avatar && item.avatar !== 'MCP_AVATAR';const isCustom = item.type === 'customPlugin';+ // Community rows installed server-side may carry no `meta.title`; never+ // render an empty label — fall back to the identifier like every other+ // group in this menu does.+ const title = item.title || item.identifier;const icon = hasRealAvatar ? (<Avatar avatar={item.avatar} shape={'square'} size={SKILL_ICON_SIZE} />) : (@@ -1430,7 +1434,7 @@ export const useControls = ({ closeDropdown }: { closeDropdown?: () => void } =description={item.description}identifier={item.identifier}sourceLabel={isCustom ? t('skillStore.tabs.custom') : t('skillStore.tabs.community')}- title={item.title}+ title={title}icon={hasRealAvatar ? (<Avatar@@ -1452,7 +1456,7 @@ export const useControls = ({ closeDropdown }: { closeDropdown?: () => void } =? { onConfigure: () => openPluginEditDrawer(item.identifier) }: undefined,deleteConfig: {- displayName: item.title ?? item.identifier,+ displayName: title,onDelete: () => uninstallPlugin(item.identifier),},extraTag: isCustom ? (@@ -1465,8 +1469,8 @@ export const useControls = ({ closeDropdown }: { closeDropdown?: () => void } =icon,id: item.identifier,popoverContent,- searchText: `${item.title} ${item.identifier}`,- title: item.title,+ searchText: `${title} ${item.identifier}`,+ title,});};diff --git a/src/features/EditorCanvas/EditorCanvas.tsx b/src/features/EditorCanvas/EditorCanvas.tsxindex 33d87ed7b1d..d910b809075 100644--- a/src/features/EditorCanvas/EditorCanvas.tsx+++ b/src/features/EditorCanvas/EditorCanvas.tsx@@ -42,6 +42,13 @@ export interface EditorCanvasProps {*/autoSave?: boolean;+ /**+ * Keep the caret out of Lexical's root node around block images by pushing+ * an empty paragraph next to the image (otherwise a horizontal root-level+ * caret shows above / below it). Off by default; comment editors opt in.+ */+ blockImageCaretGuard?: boolean;+/*** Reload an already-mounted editor when an authoritative external content* revision changes. Keep this stable for local autosave echoes and unchangeddiff --git a/src/features/EditorCanvas/InternalEditor.test.tsx b/src/features/EditorCanvas/InternalEditor.test.tsxindex 7b56ed425f0..d2ea3df8ff2 100644--- a/src/features/EditorCanvas/InternalEditor.test.tsx+++ b/src/features/EditorCanvas/InternalEditor.test.tsx@@ -10,6 +10,11 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { type InternalEditorProps } from './InternalEditor';import InternalEditor from './InternalEditor';+import { registerBlockDecoratorCaretGuard } from './registerBlockDecoratorCaretGuard';++vi.mock('./registerBlockDecoratorCaretGuard', () => ({+ registerBlockDecoratorCaretGuard: vi.fn(() => vi.fn()),+}));// Suppress console.warn for expected errors in testsconst originalWarn = console.warn;@@ -480,6 +485,58 @@ describe('InternalEditor', () => {});});+ describe('block image caret guard', () => {+ it('is not registered by default (document body keeps stock editor behaviour)', async () => {+ vi.mocked(registerBlockDecoratorCaretGuard).mockClear();+ let editorInstance: IEditor | undefined;++ render(+ <MinimalTestWrapper+ onEditorReady={(e) => {+ editorInstance = e;+ }}+ />,+ );++ await act(async () => {+ await moment();+ });+ await waitFor(() => {+ expect(editorInstance).toBeDefined();+ });++ expect(registerBlockDecoratorCaretGuard).not.toHaveBeenCalled();+ });++ it('registers the guard for the editor when blockImageCaretGuard is set and unregisters on unmount', async () => {+ vi.mocked(registerBlockDecoratorCaretGuard).mockClear();+ const unregister = vi.fn();+ vi.mocked(registerBlockDecoratorCaretGuard).mockReturnValueOnce(unregister);+ let editorInstance: IEditor | undefined;++ const { unmount } = render(+ <MinimalTestWrapper+ blockImageCaretGuard+ onEditorReady={(e) => {+ editorInstance = e;+ }}+ />,+ );++ await act(async () => {+ await moment();+ });+ await waitFor(() => {+ expect(editorInstance).toBeDefined();+ });++ expect(registerBlockDecoratorCaretGuard).toHaveBeenCalledWith(editorInstance);++ unmount();+ expect(unregister).toHaveBeenCalled();+ });+ });+describe('lexical editor access', () => {it('should expose getLexicalEditor method', async () => {let editorInstance: IEditor | undefined;diff --git a/src/features/EditorCanvas/InternalEditor.tsx b/src/features/EditorCanvas/InternalEditor.tsxindex aae4464a000..22307b35fc2 100644--- a/src/features/EditorCanvas/InternalEditor.tsx+++ b/src/features/EditorCanvas/InternalEditor.tsx@@ -22,6 +22,7 @@ import { type EditorCanvasProps } from './EditorCanvas';import InlineToolbar from './InlineToolbar';import LinearFilePlugin from './LinearFilePlugin';import { registerAttachmentClickOpen } from './registerAttachmentClickOpen';+import { registerBlockDecoratorCaretGuard } from './registerBlockDecoratorCaretGuard';import { useFileUpload, useImageUpload } from './useImageUpload';const IMAGE_FILTERS = [@@ -98,6 +99,7 @@ export interface InternalEditorProps extends EditorCanvasProps {*/const InternalEditor = memo<InternalEditorProps>(({+ blockImageCaretGuard = false,contentChangeLockRef,contentStyle,disabled,@@ -220,6 +222,15 @@ const InternalEditor = memo<InternalEditorProps>(return () => unregister?.();}, [editor]);+ // Opt-in (comment editors): keep the caret out of the root node around+ // block images by pushing an empty paragraph next to the image instead of+ // showing Lexical's horizontal root-level caret (LOBE-13882).+ useEffect(() => {+ if (!editor || !blockImageCaretGuard) return;+ const unregister = registerBlockDecoratorCaretGuard(editor);+ return () => unregister?.();+ }, [blockImageCaretGuard, editor]);+const onInitRef = useRef(onInit);const initializedEditorRef = useRef<IEditor | null>(null);diff --git a/src/features/EditorCanvas/registerBlockDecoratorCaretGuard.test.ts b/src/features/EditorCanvas/registerBlockDecoratorCaretGuard.test.tsnew file mode 100644index 00000000000..f2b6fd8cbe6--- /dev/null+++ b/src/features/EditorCanvas/registerBlockDecoratorCaretGuard.test.ts@@ -0,0 +1,206 @@+import {+ $createParagraphNode,+ $createTextNode,+ $getRoot,+ $getSelection,+ $isRangeSelection,+ createEditor,+ DecoratorNode,+ type LexicalEditor,+ type LexicalNode,+} from 'lexical';+import { describe, expect, it } from 'vitest';++import { registerBlockDecoratorCaretGuardOnLexical } from './registerBlockDecoratorCaretGuard';++class FakeBlockNode extends DecoratorNode<null> {+ static getType() {+ return 'fake-block';+ }++ static clone(node: FakeBlockNode) {+ return new FakeBlockNode(node.__key);+ }++ static importJSON() {+ return new FakeBlockNode();+ }++ isInline() {+ return false;+ }++ createDOM() {+ return document.createElement('div');+ }++ updateDOM() {+ return false;+ }++ decorate() {+ return null;+ }+}++const $isFakeBlock = (node: LexicalNode | null | undefined): node is FakeBlockNode =>+ node instanceof FakeBlockNode;++// Commit the pending update, then let the guard's follow-up update (queued from+// the update listener) run before we read the editor state.+const flush = async (editor: LexicalEditor) => {+ await new Promise<void>((resolve) => {+ editor.update(() => undefined, { onUpdate: resolve });+ });+ await new Promise<void>((resolve) => {+ setTimeout(resolve, 0);+ });+};++const createGuardedEditor = () => {+ const editor = createEditor({+ nodes: [FakeBlockNode],+ onError: (e) => {+ throw e;+ },+ });+ registerBlockDecoratorCaretGuardOnLexical(editor);+ return editor;+};++const readSnapshot = (editor: LexicalEditor) => {+ let childTypes: string[] = [];+ let caretParentType: string | undefined;+ let caretIndex: number | undefined;+ editor.getEditorState().read(() => {+ const root = $getRoot();+ childTypes = root.getChildren().map((child) => child.getType());+ const selection = $getSelection();+ if ($isRangeSelection(selection)) {+ const anchorNode = selection.anchor.getNode();+ caretParentType = anchorNode.getType();+ caretIndex = anchorNode.getIndexWithinParent();+ }+ });+ return { caretIndex, caretParentType, childTypes };+};++describe('registerBlockDecoratorCaretGuard', () => {+ it('pushes an empty paragraph after a trailing block decorator and moves the caret into it', async () => {+ const editor = createGuardedEditor();++ editor.update(() => {+ const root = $getRoot();+ const block = new FakeBlockNode();+ root.append(block);+ // Mirrors Lexical's insertNodes: decorator.selectEnd() → root.select()+ block.selectEnd();+ });+ await flush(editor);++ expect(readSnapshot(editor)).toEqual({+ caretIndex: 1,+ caretParentType: 'paragraph',+ childTypes: ['fake-block', 'paragraph'],+ });+ });++ it('pushes an empty paragraph before a leading block decorator when the caret lands at root offset 0', async () => {+ const editor = createGuardedEditor();++ editor.update(() => {+ const root = $getRoot();+ root.append(new FakeBlockNode());+ const paragraph = $createParagraphNode();+ paragraph.append($createTextNode('after'));+ root.append(paragraph);+ // Mirrors clicking left of the first-line image: DOM point → root offset 0+ root.select(0, 0);+ });+ await flush(editor);++ expect(readSnapshot(editor)).toEqual({+ caretIndex: 0,+ caretParentType: 'paragraph',+ childTypes: ['paragraph', 'fake-block', 'paragraph'],+ });+ });++ it('inserts a paragraph between two adjacent block decorators', async () => {+ const editor = createGuardedEditor();++ editor.update(() => {+ const root = $getRoot();+ root.append(new FakeBlockNode(), new FakeBlockNode());+ root.select(1, 1);+ });+ await flush(editor);++ expect(readSnapshot(editor)).toEqual({+ caretIndex: 1,+ caretParentType: 'paragraph',+ childTypes: ['fake-block', 'paragraph', 'fake-block'],+ });+ });++ it('reuses an adjacent paragraph instead of inserting a new one', async () => {+ const editor = createGuardedEditor();++ editor.update(() => {+ const root = $getRoot();+ const paragraph = $createParagraphNode();+ paragraph.append($createTextNode('before'));+ root.append(paragraph, new FakeBlockNode());+ // Root point right after the paragraph, before the decorator+ root.select(1, 1);+ });+ await flush(editor);++ let anchorText = '';+ let anchorOffset = -1;+ editor.getEditorState().read(() => {+ const selection = $getSelection();+ if ($isRangeSelection(selection)) {+ anchorText = selection.anchor.getNode().getTextContent();+ anchorOffset = selection.anchor.offset;+ }+ });++ expect(readSnapshot(editor).childTypes).toEqual(['paragraph', 'fake-block']);+ expect(anchorText).toBe('before');+ expect(anchorOffset).toBe('before'.length);+ });++ it('leaves a normal paragraph caret untouched', async () => {+ const editor = createGuardedEditor();++ editor.update(() => {+ const paragraph = $createParagraphNode();+ paragraph.append($createTextNode('hello'));+ $getRoot().append(paragraph);+ paragraph.selectEnd();+ });+ await flush(editor);++ expect(readSnapshot(editor).childTypes).toEqual(['paragraph']);+ });++ it('does nothing when the editor is not editable', async () => {+ const editor = createGuardedEditor();+ editor.setEditable(false);++ editor.update(() => {+ const root = $getRoot();+ const block = new FakeBlockNode();+ root.append(block);+ block.selectEnd();+ });+ await flush(editor);++ const { childTypes } = readSnapshot(editor);+ expect(childTypes).toEqual(['fake-block']);+ editor.getEditorState().read(() => {+ expect($isFakeBlock($getRoot().getFirstChild())).toBe(true);+ });+ });+});diff --git a/src/features/EditorCanvas/registerBlockDecoratorCaretGuard.ts b/src/features/EditorCanvas/registerBlockDecoratorCaretGuard.tsnew file mode 100644index 00000000000..5afdfd36ecc--- /dev/null+++ b/src/features/EditorCanvas/registerBlockDecoratorCaretGuard.ts@@ -0,0 +1,97 @@+import type { IEditor } from '@lobehub/editor';+import {+ $createParagraphNode,+ $getRoot,+ $getSelection,+ $isElementNode,+ $isRangeSelection,+ $isRootNode,+ HISTORY_MERGE_TAG,+ type LexicalEditor,+ type RangeSelection,+} from 'lexical';++/**+ * Detect a collapsed selection whose anchor sits directly on the root node.+ *+ * Lexical only produces such a point when the caret has nowhere else to go —+ * typically right before / after a block-level DecoratorNode (block image,+ * hr, …) that has no sibling paragraph. The browser then paints the native+ * caret inside the root container, which shows up as the "horizontal caret"+ * hovering over the image.+ */+const $isRootLevelCollapsedSelection = (+ selection: ReturnType<typeof $getSelection>,+): selection is RangeSelection =>+ $isRangeSelection(selection) &&+ selection.isCollapsed() &&+ selection.anchor.type === 'element' &&+ $isRootNode(selection.anchor.getNode());++/**+ * Move a root-level caret into a real block. Prefers an adjacent element+ * (no content change); otherwise pushes a fresh empty paragraph into the gap+ * so the caret has a home — the same "顶出一行空行" behaviour Linear has.+ */+const $repairRootLevelCaret = (offset: number) => {+ const root = $getRoot();+ const next = root.getChildAtIndex(offset);+ const prev = offset > 0 ? root.getChildAtIndex(offset - 1) : null;++ if ($isElementNode(next)) {+ next.selectStart();+ return;+ }+ if ($isElementNode(prev)) {+ prev.selectEnd();+ return;+ }++ const paragraph = $createParagraphNode();+ if (next) next.insertBefore(paragraph);+ else if (prev) prev.insertAfter(paragraph);+ else root.append(paragraph);+ paragraph.select();+};++export const registerBlockDecoratorCaretGuardOnLexical = (lexicalEditor: LexicalEditor) =>+ lexicalEditor.registerUpdateListener(({ editorState }) => {+ if (!lexicalEditor.isEditable()) return;++ let offset: number | null = null;+ editorState.read(() => {+ const selection = $getSelection();+ if ($isRootLevelCollapsedSelection(selection)) offset = selection.anchor.offset;+ });+ if (offset === null) return;++ const rootOffset = offset;+ lexicalEditor.update(+ () => {+ // Re-validate inside the update: another listener may have already moved the caret.+ const selection = $getSelection();+ if (!$isRootLevelCollapsedSelection(selection)) return;+ $repairRootLevelCaret(rootOffset);+ },+ { tag: HISTORY_MERGE_TAG },+ );+ });++/**+ * Keep the caret out of the root node around block decorators (block images,+ * hr, …). Two user-visible symptoms this fixes:+ *+ * 1. Inserting / pasting a block image on an empty line: Lexical's+ * `insertNodes` drops the empty paragraph and calls `selectEnd()` on the+ * decorator, which resolves to a root-level point → horizontal caret.+ * 2. Clicking left of a block image that is the first line of the document:+ * the DOM point resolves to root offset 0 → horizontal caret.+ *+ * In both cases we push an empty paragraph next to the decorator and move the+ * caret into it (or into an existing neighbouring block when there is one).+ */+export const registerBlockDecoratorCaretGuard = (editor: IEditor): (() => void) | undefined => {+ const lexicalEditor = editor.getLexicalEditor?.();+ if (!lexicalEditor) return;+ return registerBlockDecoratorCaretGuardOnLexical(lexicalEditor);+};diff --git a/src/features/PageEditor/DocumentComments/DocumentCommentEditor.tsx b/src/features/PageEditor/DocumentComments/DocumentCommentEditor.tsxindex 7c1eef0c9d8..95f447eabb8 100644--- a/src/features/PageEditor/DocumentComments/DocumentCommentEditor.tsx+++ b/src/features/PageEditor/DocumentComments/DocumentCommentEditor.tsx@@ -14,6 +14,7 @@ import {import { useWorkspaceCommentMentionOption } from '@/features/Portal/TopicComments/useWorkspaceCommentMentionOption';import { styles } from './styles';+import { useFreezeHeightWhileResizingImage } from './useFreezeHeightWhileResizingImage';export type DocumentCommentEditorValue = TopicCommentEditorValue;@@ -57,6 +58,7 @@ const DocumentCommentEditor = memo<DocumentCommentEditorProps>(const internalEditor = useEditor();const editor = externalEditor ?? internalEditor;const mentionOption = useWorkspaceCommentMentionOption();+ const rootRef = useFreezeHeightWhileResizingImage();const setValue = useCallback((value: DocumentCommentEditorValue) => {@@ -85,8 +87,9 @@ const DocumentCommentEditor = memo<DocumentCommentEditorProps>();return (- <div className={`${styles.commentEditor} ${mentionFilledClassName}`}>+ <div className={`${styles.commentEditor} ${mentionFilledClassName}`} ref={rootRef}><EditorCanvas+ blockImageCaretGuarddisabled={disabled}editor={editor}editorData={{ content: initialContent, editorData: initialEditorData }}@@ -98,9 +101,12 @@ const DocumentCommentEditor = memo<DocumentCommentEditorProps>(contentStyle={{minHeight: compact ? 24 : 44,// On top of ChatInput's own 8px/12px body padding: keep content —- // images especially — clear of the box edges.+ // images especially — clear of the box edges. Only the vertical+ // padding lives here: the editor forwards this style to its+ // absolutely positioned placeholder as well, so a horizontal+ // padding would push the placeholder 8px past the caret. The+ // inline padding sits on `styles.commentEditor` instead.paddingBlock: '6px 10px',- paddingInline: 8,}}onContentChange={() => onChange?.(readTopicCommentEditorValue(editor))}onInit={handleInit}diff --git a/src/features/PageEditor/DocumentComments/styles.test.ts b/src/features/PageEditor/DocumentComments/styles.test.tsnew file mode 100644index 00000000000..3579ace64bb--- /dev/null+++ b/src/features/PageEditor/DocumentComments/styles.test.ts@@ -0,0 +1,30 @@+import { describe, expect, it } from 'vitest';++import { RESIZED_IMAGE_SELECTOR } from './styles';++const matches = (style: string) => {+ const img = document.createElement('img');+ img.setAttribute('style', style);+ return img.matches(RESIZED_IMAGE_SELECTOR);+};++describe('RESIZED_IMAGE_SELECTOR', () => {+ it('matches a resized image whose width follows max-width (editor markup)', () => {+ expect(matches('max-width: calc(min(320px, 100%)); width: 320px;')).toBe(true);+ });++ it('matches a resized image whose width is the first declaration (renderer without maxWidth)', () => {+ expect(matches('width: 320px;')).toBe(true);+ expect(matches('width: 320px; height: 200px;')).toBe(true);+ });++ it('does not match an untouched image carrying width: inherit', () => {+ expect(matches('max-width: 500px; width: inherit;')).toBe(false);+ expect(matches('width: inherit;')).toBe(false);+ });++ it('does not treat max-width alone as a resize', () => {+ expect(matches('max-width: 500px;')).toBe(false);+ expect(matches('')).toBe(false);+ });+});diff --git a/src/features/PageEditor/DocumentComments/styles.ts b/src/features/PageEditor/DocumentComments/styles.tsindex bbd910458a1..d07bd7f80b2 100644--- a/src/features/PageEditor/DocumentComments/styles.ts+++ b/src/features/PageEditor/DocumentComments/styles.ts@@ -12,6 +12,21 @@ export const COMMENT_CONTENT_IMAGE_MAX_HEIGHT = 480;*/export const COMMENT_INPUT_MAX_HEIGHT = 100_000;+/**+ * An image the user has explicitly resized. The editor's image plugin writes+ * the dragged width to the `<img>` inline style (`width: 320px`) while an+ * untouched image carries `width: inherit`; `LexicalRenderer` (published+ * comments) only inlines `width` once the node has one. `width` may be the+ * first declaration (a node without `maxWidth` renders `style="width: 320px"`)+ * or follow `max-width`, so both the start-of-value and the leading-space forms+ * are matched; `max-width` itself never matches either form. This is the one+ * signal that separates "user picked a size" from "thumbnail default".+ */+export const RESIZED_IMAGE_SELECTOR =+ 'img:is([style^="width:"], [style*=" width:"]):not([style^="width: inherit"]):not([style*=" width: inherit"])';++const RESIZED_IMAGE = RESIZED_IMAGE_SELECTOR;+export const styles = createStaticStyles(({ css }) => ({actions: css`margin-inline-start: 40px;@@ -45,15 +60,35 @@ export const styles = createStaticStyles(({ css }) => ({}& img {- width: auto !important;max-width: 100% !important;height: auto !important;+ }++ /* Thumbnail default only for images the author never resized — a stored+ width is the author's choice and is honoured exactly like the body. */+ & img:not(${RESIZED_IMAGE}) {+ width: auto !important;max-height: ${COMMENT_CONTENT_IMAGE_MAX_HEIGHT}px;}`,commentEditor: css`min-width: 0;+ /* Horizontal breathing room for the editor body, on top of ChatInput's own+ 12px. Kept out of the editor's style prop: the editor forwards that prop+ to its absolutely positioned placeholder too, so any inline padding+ there would push the placeholder past the caret. */+ padding-inline: 16px;++ /* The placeholder carries a 4px top margin meant to mirror a paragraph's+ default margin; the first block below has that margin removed, so drop+ the placeholder's as well to keep it on the caret line. It is an+ absolutely positioned later sibling of the editable area, after a+ couple of empty plugin slots, hence the general sibling selector. */+ & [contenteditable='true'] ~ div {+ margin-block-start: 0 !important;+ }+/* Rich Markdown blocks carry document margins by default. A chat inputkeeps only inter-block rhythm so the first typed heading never jumps. */& [contenteditable='true'] > :first-child {@@ -80,9 +115,15 @@ export const styles = createStaticStyles(({ css }) => ({}& [contenteditable='true'] img {- width: auto !important;max-width: 100% !important;height: auto !important;+ }++ /* Only untouched images get the thumbnail treatment. Forcing width: auto+ on every image would beat the inline width the resize handles write, so+ dragging would appear to do nothing (LOBE-13874). */+ & [contenteditable='true'] img:not(${RESIZED_IMAGE}) {+ width: auto !important;max-height: ${COMMENT_EDITOR_IMAGE_MAX_HEIGHT}px;}`,diff --git a/src/features/PageEditor/DocumentComments/useFreezeHeightWhileResizingImage.test.ts b/src/features/PageEditor/DocumentComments/useFreezeHeightWhileResizingImage.test.tsnew file mode 100644index 00000000000..b56de5d4f8d--- /dev/null+++ b/src/features/PageEditor/DocumentComments/useFreezeHeightWhileResizingImage.test.ts@@ -0,0 +1,71 @@+import { act, renderHook } from '@testing-library/react';+import { afterEach, describe, expect, it, vi } from 'vitest';++import { useFreezeHeightWhileResizingImage } from './useFreezeHeightWhileResizingImage';++const mount = () => {+ const root = document.createElement('div');+ const editable = document.createElement('div');+ editable.setAttribute('contenteditable', 'true');+ const container = document.createElement('div');+ const img = document.createElement('img');+ const handle = document.createElement('div');+ handle.style.cursor = 'col-resize';+ container.append(img, handle);+ editable.append(container);+ root.append(editable);+ document.body.append(root);+ vi.spyOn(root, 'getBoundingClientRect').mockReturnValue({ height: 180 } as DOMRect);+ return { handle, img, root };+};++const mouse = (type: string) => new MouseEvent(type, { bubbles: true });++describe('useFreezeHeightWhileResizingImage', () => {+ afterEach(() => {+ document.body.innerHTML = '';+ vi.restoreAllMocks();+ });++ it('locks the wrapper height while an image handle is dragged and releases on mouseup', () => {+ const { handle, root } = mount();+ const { result } = renderHook(() => useFreezeHeightWhileResizingImage());+ act(() => result.current(root));++ handle.dispatchEvent(mouse('mousedown'));+ expect(root.style.height).toBe('180px');+ expect(root.style.overflow).toBe('hidden');++ document.dispatchEvent(mouse('mouseup'));+ expect(root.style.height).toBe('');+ expect(root.style.overflow).toBe('');+ });++ it('ignores mousedown on anything that is not a resize handle', () => {+ const { img, root } = mount();+ const { result } = renderHook(() => useFreezeHeightWhileResizingImage());+ act(() => result.current(root));++ img.dispatchEvent(mouse('mousedown'));+ expect(root.style.height).toBe('');++ const text = document.createElement('div');+ text.style.cursor = 'col-resize';+ root.append(text);+ text.dispatchEvent(mouse('mousedown'));+ expect(root.style.height).toBe('');+ });++ it('releases a pending lock when the editor unmounts mid-drag', () => {+ const { handle, root } = mount();+ const { result, unmount } = renderHook(() => useFreezeHeightWhileResizingImage());+ act(() => result.current(root));++ handle.dispatchEvent(mouse('mousedown'));+ expect(root.style.height).toBe('180px');++ unmount();+ expect(root.style.height).toBe('');+ expect(root.style.overflow).toBe('');+ });+});diff --git a/src/features/PageEditor/DocumentComments/useFreezeHeightWhileResizingImage.ts b/src/features/PageEditor/DocumentComments/useFreezeHeightWhileResizingImage.tsnew file mode 100644index 00000000000..e06a2e897d1--- /dev/null+++ b/src/features/PageEditor/DocumentComments/useFreezeHeightWhileResizingImage.ts@@ -0,0 +1,58 @@+import { useCallback, useEffect, useState } from 'react';++/**+ * The image plugin's resize handle: a childless `div` with `cursor: col-resize`+ * rendered next to the `<img>` inside the editable area. It carries no stable+ * class or data attribute, so recognise it by what it is rather than by name.+ */+const isImageResizeHandle = (target: EventTarget | null): target is HTMLElement => {+ if (!(target instanceof HTMLElement)) return false;+ if (target.childElementCount > 0) return false;+ if (!target.closest('[contenteditable="true"]')) return false;+ if (!target.parentElement?.querySelector('img')) return false;+ return getComputedStyle(target).cursor === 'col-resize';+};++/**+ * Comment boxes grow with their content, and image resizing is aspect-locked,+ * so every horizontal drag frame also changes the box height — the border+ * visibly pulses while the handle moves. Freeze the wrapper at its current+ * height for the duration of the drag (clipping any growth) and let it settle+ * to the final size once the mouse is released.+ */+export const useFreezeHeightWhileResizingImage = () => {+ const [root, setRoot] = useState<HTMLDivElement | null>(null);+ const rootRef = useCallback((node: HTMLDivElement | null) => setRoot(node), []);++ useEffect(() => {+ if (!root) return;++ let release: (() => void) | undefined;++ const onMouseDown = (event: MouseEvent) => {+ if (!isImageResizeHandle(event.target)) return;++ root.style.height = `${root.getBoundingClientRect().height}px`;+ root.style.overflow = 'hidden';++ release = () => {+ root.style.height = '';+ root.style.overflow = '';+ release = undefined;+ };+ document.addEventListener('mouseup', release, { once: true });+ };++ // Capture phase: the handle stops propagation of its own mousedown.+ root.addEventListener('mousedown', onMouseDown, true);+ return () => {+ root.removeEventListener('mousedown', onMouseDown, true);+ if (release) {+ document.removeEventListener('mouseup', release);+ release();+ }+ };+ }, [root]);++ return rootRef;+};diff --git a/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNode.tsx b/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNode.tsxindex 5fdbcc186e4..ee99e2c4d0b 100644--- a/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNode.tsx+++ b/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNode.tsx@@ -26,6 +26,7 @@ import { useTreeStore } from '@/store/tree';import { useFileItemClick } from '../Explorer/hooks/useFileItemClick';import { useFileItemDropdown } from '../Explorer/ItemDropdown/useFileItemDropdown';import FolderAddButton from './FolderAddButton';+import HierarchyNodeMenuButton from './HierarchyNodeMenuButton';import { isHierarchyNodeActive, resolveDeletedFolderRedirect } from './selection';import { styles } from './styles';@@ -372,7 +373,10 @@ export const HierarchyNode = memo<HierarchyNodeProps>(</span>)}</Flexbox>- {!flat && <FolderAddButton folderId={item.id} />}+ <Flexbox horizontal align={'center'}>+ {!flat && <FolderAddButton folderId={item.id} />}+ <HierarchyNodeMenuButton menuItems={menuItems} />+ </Flexbox></Block></Flexbox>);@@ -433,6 +437,7 @@ export const HierarchyNode = memo<HierarchyNodeProps>({item.name}</span></Flexbox>+ <HierarchyNodeMenuButton menuItems={menuItems} /></Block></Flexbox>);diff --git a/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNodeMenuButton.tsx b/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNodeMenuButton.tsxnew file mode 100644index 00000000000..a24df4cc6d3--- /dev/null+++ b/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNodeMenuButton.tsx@@ -0,0 +1,49 @@+'use client';++import { DropdownMenu, stopPropagation } from '@lobehub/ui';+import { ActionIcon } from '@lobehub/ui/base-ui';+import type { ItemType } from 'antd/es/menu/interface';+import { MoreHorizontalIcon } from 'lucide-react';+import { memo, useState } from 'react';+import { useTranslation } from 'react-i18next';++interface HierarchyNodeMenuButtonProps {+ /**+ * The same item list the row's right-click menu opens, so the two entry+ * points can never drift apart.+ */+ menuItems: () => ItemType[];+}++/**+ * Hover-revealed "..." on a tree row that opens the row's action menu. The+ * menu used to be reachable only through `onContextMenu`, which nobody finds+ * (LOBE-13884). Shares the `.hierarchy-node-actions` reveal rules with the+ * folder "+" (see styles.ts): hidden until hover, and kept visible while open.+ */+const HierarchyNodeMenuButton = memo<HierarchyNodeMenuButtonProps>(({ menuItems }) => {+ const { t } = useTranslation('common');+ const [menuOpen, setMenuOpen] = useState(false);++ return (+ <div+ className={'hierarchy-node-actions'}+ data-open={menuOpen}+ onClick={stopPropagation}+ onPointerDown={stopPropagation}+ >+ <DropdownMenu+ items={menuItems}+ open={menuOpen}+ placement="bottomLeft"+ onOpenChange={setMenuOpen}+ >+ <ActionIcon icon={MoreHorizontalIcon} size={'small'} title={t('more')} />+ </DropdownMenu>+ </div>+ );+});++HierarchyNodeMenuButton.displayName = 'HierarchyNodeMenuButton';++export default HierarchyNodeMenuButton;diff --git a/src/store/tool/slices/plugin/selectors.test.ts b/src/store/tool/slices/plugin/selectors.test.tsindex 632dcf92017..972dda4c82a 100644--- a/src/store/tool/slices/plugin/selectors.test.ts+++ b/src/store/tool/slices/plugin/selectors.test.ts@@ -59,6 +59,40 @@ describe('pluginSelectors', () => {title: 'Plugin 1',});});++ it('derives meta from a marketplace-shaped manifest without `meta`', () => {+ // Community MCP rows installed by the server-side agent builder store the+ // marketplace manifest verbatim: flat name/description/icon, no `meta`.+ const state = {+ ...mockState,+ installedPlugins: [+ {+ identifier: 'alpaca-mcp',+ manifest: {+ description: 'Trade with Alpaca',+ icon: 'https://example.com/alpaca.png',+ identifier: 'alpaca-mcp',+ name: 'Alpaca MCP',+ tags: ['finance'],+ tools: [],+ } as unknown as ToolManifest,+ type: 'plugin',+ },+ ],+ } as ToolStoreState;++ expect(pluginSelectors.getPluginMetaById('alpaca-mcp')(state)).toEqual({+ avatar: 'https://example.com/alpaca.png',+ description: 'Trade with Alpaca',+ tags: ['finance'],+ title: 'Alpaca MCP',+ });+ });++ it('returns undefined when the manifest carries neither meta nor a market name', () => {+ const result = pluginSelectors.getPluginMetaById('plugin-3')(mockState);+ expect(result).toBeUndefined();+ });});describe('getDevPluginById', () => {@@ -171,6 +205,22 @@ describe('pluginSelectors', () => {expect(result[0].identifier).toBe('plugin-1');expect(result[0].type).toBe('plugin');});++ it('surfaces the market name as title for a meta-less community plugin', () => {+ const state = {+ ...mockState,+ installedPlugins: [+ {+ identifier: 'alpaca-mcp',+ manifest: { identifier: 'alpaca-mcp', name: 'Alpaca MCP' } as unknown as ToolManifest,+ type: 'plugin',+ },+ ],+ } as ToolStoreState;++ const [item] = pluginSelectors.installedPluginMetaList(state);+ expect(item.title).toBe('Alpaca MCP');+ });});describe('installedCustomPluginMetaList', () => {diff --git a/src/store/tool/slices/plugin/selectors.ts b/src/store/tool/slices/plugin/selectors.tsindex 3d592752f5c..40cd9cef80c 100644--- a/src/store/tool/slices/plugin/selectors.ts+++ b/src/store/tool/slices/plugin/selectors.ts@@ -1,4 +1,4 @@-import { type ToolManifest } from '@lobechat/types';+import { type Meta, type ToolManifest } from '@lobechat/types';import { isInstalledPluginAvailableInCurrentEnv } from '@/helpers/toolAvailability';import { type InstallPluginMeta, type LobeToolCustomPlugin } from '@/types/tool/plugin';@@ -16,14 +16,51 @@ const getInstalledPluginById = (id?: string) => (s: ToolStoreState) => {return installedPlugins(s).find((p) => p.identifier === id);};+/**+ * Marketplace `PluginManifest` shape (`@lobehub/market-types`): flat+ * `name` / `description` / `icon` and no `meta` object. The server-side agent+ * builder install path stores this shape verbatim in `user_installed_plugins`,+ * so a community MCP row can reach the client without `manifest.meta`.+ */+interface MarketShapedManifest {+ description?: string;+ icon?: string;+ meta?: Meta;+ name?: string;+ tags?: string[];+}++/**+ * Resolve the display meta of an installed plugin manifest.+ *+ * Prefers the LobeChat `manifest.meta`; when it is absent, derive it from the+ * marketplace shape so the row still renders its real name instead of a blank+ * label.+ */+export const resolvePluginManifestMeta = (manifest?: ToolManifest | null): Meta | undefined => {+ if (!manifest) return;+ if (manifest.meta) return manifest.meta;++ const { description, icon, name, tags } = manifest as MarketShapedManifest;+ // `Meta.title` is required; without a market `name` there is nothing to+ // derive and consumers fall back to the identifier.+ if (!name) return;++ return {+ avatar: icon,+ description,+ tags,+ title: name,+ };+};+const getPluginMetaById = (id: string) => (s: ToolStoreState) => {- return getInstalledPluginById(id)(s)?.manifest?.meta;+ return resolvePluginManifestMeta(getInstalledPluginById(id)(s)?.manifest);};const getCustomPluginById = (id: string) => (s: ToolStoreState) =>installedPlugins(s).find((i) => i.identifier === id && i.type === 'customPlugin') as- | LobeToolCustomPlugin- | undefined;+ LobeToolCustomPlugin | undefined;const getToolManifestById = (id: string) => (s: ToolStoreState) =>getInstalledPluginById(id)(s)?.manifest;diff --git a/src/store/tree/actions.test.ts b/src/store/tree/actions.test.tsindex 9eb8ab2f3e1..b46e08b8749 100644--- a/src/store/tree/actions.test.ts+++ b/src/store/tree/actions.test.ts@@ -1,7 +1,7 @@import { CUSTOM_FOLDER_FILE_TYPE } from '@lobechat/const';import { beforeEach, describe, expect, it, vi } from 'vitest';-import { toTreeItem, TreeActionImpl } from './actions';+import { sortTreeItems, toTreeItem, TreeActionImpl } from './actions';import type { TreeState } from './types';const {@@ -608,3 +608,58 @@ describe('TreeActionImpl.dropNodes', () => {expect(revalidateSpy).not.toHaveBeenCalled();});});++describe('sortTreeItems', () => {+ const doc = (id: string, name: string, createdAt?: string) =>+ toTreeItem({ createdAt, fileType: 'custom/document', id, name });++ it('puts a just-created page first instead of dropping it into the A-Z list', () => {+ // LOBE-13814: creating a page inside a folder full of "<name> 周报 — 2026-Wxx"+ // rows landed the new "Untitled" between "TC" and "xiaojie".+ const rows = [+ doc('report-tc', 'TC 周报 — 2026-W35', '2026-08-28T02:00:00.000Z'),+ doc('untitled', 'Untitled', '2026-09-04T15:31:00.000Z'),+ doc('report-xiaojie', 'xiaojie 周报 — 2026-W35', '2026-08-29T02:00:00.000Z'),+ ];++ expect(sortTreeItems(rows).map((item) => item.id)).toEqual([+ 'untitled',+ 'report-xiaojie',+ 'report-tc',+ ]);+ });++ it('keeps folders ahead of documents no matter how new the document is', () => {+ const folderRow = toTreeItem({+ createdAt: '2026-01-01T00:00:00.000Z',+ fileType: CUSTOM_FOLDER_FILE_TYPE,+ id: 'folder-old',+ name: '2026.08',+ });+ const newest = doc('doc-new', 'Untitled', '2026-09-04T15:31:00.000Z');++ expect(sortTreeItems([newest, folderRow]).map((item) => item.id)).toEqual([+ 'folder-old',+ 'doc-new',+ ]);+ });++ it('sends rows without a timestamp to the tail of their group in A-Z order', () => {+ const rows = [+ doc('stub-b', 'B stub'),+ doc('dated', 'Dated', '2026-08-01T00:00:00.000Z'),+ doc('stub-a', 'A stub'),+ ];++ expect(sortTreeItems(rows).map((item) => item.id)).toEqual(['dated', 'stub-a', 'stub-b']);+ });++ it('breaks a createdAt tie by name', () => {+ const rows = [+ doc('b', 'Beta', '2026-08-01T00:00:00.000Z'),+ doc('a', 'Alpha', '2026-08-01T00:00:00.000Z'),+ ];++ expect(sortTreeItems(rows).map((item) => item.id)).toEqual(['a', 'b']);+ });+});diff --git a/src/store/tree/actions.ts b/src/store/tree/actions.tsindex bbf6bcedf3d..5ec65200b78 100644--- a/src/store/tree/actions.ts+++ b/src/store/tree/actions.ts@@ -25,15 +25,39 @@ export const revalidateHierarchySearch = () =>{ revalidate: true },);+const createdTime = (value?: Date | string): number => {+ if (!value) return 0;+ const time = new Date(value).getTime();+ return Number.isNaN(time) ? 0 : time;+};++/**+ * Folders first, then newest first inside each group.+ *+ * Every write path (`loadChildren`, `revalidate`, `reconcile`, the optimistic+ * move inserts) runs rows through this, so it — not the server — decides what+ * the sidebar shows. Ordering by name dropped a just-created row into the+ * middle of an A-Z list, which is neither where the user was looking nor what+ * the explorer shows: the resource query returns `created_at desc` and the+ * explorer's default sorter is `createdAt` / `Desc`. Name only breaks ties, and+ * rows with no timestamp (optimistic stubs, older cached payloads) sort as 0 so+ * they keep a stable A-Z tail instead of drifting.+ */export const sortTreeItems = <T extends TreeItem>(items: T[]): T[] => {return [...items].sort((a, b) => {if (a.isFolder && !b.isFolder) return -1;if (!a.isFolder && b.isFolder) return 1;++ const aTime = createdTime(a.createdAt);+ const bTime = createdTime(b.createdAt);+ if (aTime !== bTime) return bTime - aTime;+return a.name.localeCompare(b.name);});};export const toTreeItem = (item: {+ createdAt?: Date | string | null;fileId?: string | null;fileType: string;id: string;@@ -47,6 +71,7 @@ export const toTreeItem = (item: {userId?: string | null;visibility?: 'private' | 'public' | null;}): TreeItem => ({+ createdAt: item.createdAt ?? undefined,fileId: item.fileId,fileType: item.fileType,id: item.id,diff --git a/src/store/tree/store.ts b/src/store/tree/store.tsindex 145358b9b19..dbe9d81965c 100644--- a/src/store/tree/store.ts+++ b/src/store/tree/store.ts@@ -38,6 +38,7 @@ useFileStore.subscribe((state) => {parentKey,resourceList.map((item) =>toTreeItem({+ createdAt: item.createdAt,fileId: item.fileId,fileType: item.fileType,id: item.id,diff --git a/src/store/tree/types.ts b/src/store/tree/types.tsindex fb51d906e4b..96e84a04dc7 100644--- a/src/store/tree/types.ts+++ b/src/store/tree/types.ts@@ -1,6 +1,12 @@import type { StoreHandle } from '@/store/utils/optimisticEngine';export interface TreeItem {+ /**+ * Row creation time, so the sidebar can order a folder newest-first like the+ * explorer's default sort does. Optional because optimistic stubs and older+ * cached payloads carry no timestamp; those fall back to A-Z.+ */+ createdAt?: Date | string;/*** Underlying `files.id` for file nodes. The unified resource list addresses* a file that backs a derived page by the page id, so file-table lookups