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.

✨ feat(community): recommendation for agent & Discover tab (#11445)

Neko5c102b559d5f
diff --git a/locales/ar/discover.json b/locales/ar/discover.json
index b8ba6b84aec..64251356c72 100644
--- a/locales/ar/discover.json
+++ b/locales/ar/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "المزيد",
"assistants.plugins": "المهارات المدمجة",
"assistants.recentSubmits": "التحديثات الأخيرة",
+ "assistants.sorts.recommended": "موصى به",
"assistants.sorts.createdAt": "تم النشر مؤخرًا",
"assistants.sorts.identifier": "معرّف الوكيل",
"assistants.sorts.knowledgeCount": "عدد المكتبات",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "يتضمن هذا الوكيل مكتبات",
"assistants.withPlugin": "يتضمن هذا الوكيل مهارات",
"back": "العودة إلى الاكتشاف",
+ "category.assistant.discover": "استكشاف",
"category.assistant.academic": "أكاديمي",
"category.assistant.all": "الكل",
"category.assistant.career": "المسار المهني",
diff --git a/locales/bg-BG/discover.json b/locales/bg-BG/discover.json
index 9d5d5291747..9adb7854a14 100644
--- a/locales/bg-BG/discover.json
+++ b/locales/bg-BG/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Още",
"assistants.plugins": "Интегрирани умения",
"assistants.recentSubmits": "Последни актуализации",
+ "assistants.sorts.recommended": "Препоръчани",
"assistants.sorts.createdAt": "Наскоро публикувани",
"assistants.sorts.identifier": "ID на агента",
"assistants.sorts.knowledgeCount": "Библиотеки",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Този агент включва библиотеки",
"assistants.withPlugin": "Този агент включва умения",
"back": "Обратно към откриване",
+ "category.assistant.discover": "Откриване",
"category.assistant.academic": "Академичен",
"category.assistant.all": "Всички",
"category.assistant.career": "Кариера",
diff --git a/locales/de-DE/discover.json b/locales/de-DE/discover.json
index 0a57f736e6c..b1ce0aa0b18 100644
--- a/locales/de-DE/discover.json
+++ b/locales/de-DE/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Mehr",
"assistants.plugins": "Integrierte Fähigkeiten",
"assistants.recentSubmits": "Kürzlich aktualisiert",
+ "assistants.sorts.recommended": "Empfohlen",
"assistants.sorts.createdAt": "Kürzlich veröffentlicht",
"assistants.sorts.identifier": "Agenten-ID",
"assistants.sorts.knowledgeCount": "Bibliotheken",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Dieser Agent enthält Bibliotheken",
"assistants.withPlugin": "Dieser Agent enthält Fähigkeiten",
"back": "Zurück zur Entdeckung",
+ "category.assistant.discover": "Entdecken",
"category.assistant.academic": "Akademisch",
"category.assistant.all": "Alle",
"category.assistant.career": "Karriere",
diff --git a/locales/en-US/discover.json b/locales/en-US/discover.json
index 6bed436c47b..7e24e2f844a 100644
--- a/locales/en-US/discover.json
+++ b/locales/en-US/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "More",
"assistants.plugins": "Integrated Skills",
"assistants.recentSubmits": "Recent Updates",
+ "assistants.sorts.recommended": "Recommended",
"assistants.sorts.createdAt": "Recently Published",
"assistants.sorts.identifier": "Agent ID",
"assistants.sorts.knowledgeCount": "Libraries",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "This Agent includes Libraries",
"assistants.withPlugin": "This Agent includes Skills",
"back": "Back to Discovery",
+ "category.assistant.discover": "Discover",
"category.assistant.academic": "Academic",
"category.assistant.all": "All",
"category.assistant.career": "Career",
diff --git a/locales/es-ES/discover.json b/locales/es-ES/discover.json
index f9322c855bd..f9869bf638a 100644
--- a/locales/es-ES/discover.json
+++ b/locales/es-ES/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Más",
"assistants.plugins": "Habilidades Integradas",
"assistants.recentSubmits": "Actualizaciones Recientes",
+ "assistants.sorts.recommended": "Recomendado",
"assistants.sorts.createdAt": "Recientemente Publicado",
"assistants.sorts.identifier": "ID del Agente",
"assistants.sorts.knowledgeCount": "Bibliotecas",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Este Agente incluye Bibliotecas",
"assistants.withPlugin": "Este Agente incluye Habilidades",
"back": "Volver al Descubrimiento",
+ "category.assistant.discover": "Descubrir",
"category.assistant.academic": "Académico",
"category.assistant.all": "Todos",
"category.assistant.career": "Carrera",
diff --git a/locales/fa-IR/discover.json b/locales/fa-IR/discover.json
index d358745f474..9107801c4d8 100644
--- a/locales/fa-IR/discover.json
+++ b/locales/fa-IR/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "بیشتر",
"assistants.plugins": "مهارت‌های یکپارچه",
"assistants.recentSubmits": "به‌روزرسانی‌های اخیر",
+ "assistants.sorts.recommended": "پیشنهادی",
"assistants.sorts.createdAt": "تازه‌ترین‌ها",
"assistants.sorts.identifier": "شناسه عامل",
"assistants.sorts.knowledgeCount": "تعداد کتابخانه‌ها",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "این عامل شامل کتابخانه‌ها است",
"assistants.withPlugin": "این عامل شامل مهارت‌ها است",
"back": "بازگشت به اکتشاف",
+ "category.assistant.discover": "اکتشاف",
"category.assistant.academic": "آکادمیک",
"category.assistant.all": "همه",
"category.assistant.career": "شغلی",
diff --git a/locales/fr-FR/discover.json b/locales/fr-FR/discover.json
index a5350985af0..4e68e11f8f2 100644
--- a/locales/fr-FR/discover.json
+++ b/locales/fr-FR/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Plus",
"assistants.plugins": "Compétences intégrées",
"assistants.recentSubmits": "Mises à jour récentes",
+ "assistants.sorts.recommended": "Recommandé",
"assistants.sorts.createdAt": "Récemment publié",
"assistants.sorts.identifier": "ID de l'Agent",
"assistants.sorts.knowledgeCount": "Bibliothèques",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Cet Agent inclut des bibliothèques",
"assistants.withPlugin": "Cet Agent inclut des compétences",
"back": "Retour à la découverte",
+ "category.assistant.discover": "Découverte",
"category.assistant.academic": "Académique",
"category.assistant.all": "Tous",
"category.assistant.career": "Carrière",
diff --git a/locales/it-IT/discover.json b/locales/it-IT/discover.json
index bd6d6eb41d2..2e47757619a 100644
--- a/locales/it-IT/discover.json
+++ b/locales/it-IT/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Altro",
"assistants.plugins": "Abilità integrate",
"assistants.recentSubmits": "Aggiornamenti recenti",
+ "assistants.sorts.recommended": "Consigliati",
"assistants.sorts.createdAt": "Pubblicati di recente",
"assistants.sorts.identifier": "ID Agente",
"assistants.sorts.knowledgeCount": "Librerie",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Questo Agente include Librerie",
"assistants.withPlugin": "Questo Agente include Abilità",
"back": "Torna alla Scoperta",
+ "category.assistant.discover": "Scoperta",
"category.assistant.academic": "Accademico",
"category.assistant.all": "Tutti",
"category.assistant.career": "Carriera",
diff --git a/locales/ja-JP/discover.json b/locales/ja-JP/discover.json
index 02befa3b593..6a3ddd760a7 100644
--- a/locales/ja-JP/discover.json
+++ b/locales/ja-JP/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "もっと見る",
"assistants.plugins": "プラグインを統合",
"assistants.recentSubmits": "最近の更新",
+ "assistants.sorts.recommended": "おすすめ",
"assistants.sorts.createdAt": "最新公開",
"assistants.sorts.identifier": "アシスタントID",
"assistants.sorts.knowledgeCount": "リソースライブラリの数",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "このアシスタントにはリソースライブラリが付属しています",
"assistants.withPlugin": "このアシスタントにはプラグインが付属しています",
"back": "戻る",
+ "category.assistant.discover": "発見",
"category.assistant.academic": "学術",
"category.assistant.all": "すべて",
"category.assistant.career": "キャリア",
diff --git a/locales/ko-KR/discover.json b/locales/ko-KR/discover.json
index 4a1d5608f36..67ee3ea8598 100644
--- a/locales/ko-KR/discover.json
+++ b/locales/ko-KR/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "더 보기",
"assistants.plugins": "통합 기능",
"assistants.recentSubmits": "최근 업데이트",
+ "assistants.sorts.recommended": "추천",
"assistants.sorts.createdAt": "최신 등록",
"assistants.sorts.identifier": "도우미 ID",
"assistants.sorts.knowledgeCount": "자료 라이브러리 수",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "이 도우미에는 자료 라이브러리가 포함되어 있습니다",
"assistants.withPlugin": "이 도우미는 기능을 포함합니다",
"back": "탐색으로 돌아가기",
+ "category.assistant.discover": "탐색",
"category.assistant.academic": "학술",
"category.assistant.all": "전체",
"category.assistant.career": "커리어",
diff --git a/locales/nl-NL/discover.json b/locales/nl-NL/discover.json
index 0f5998c8f1d..72cf7ede7eb 100644
--- a/locales/nl-NL/discover.json
+++ b/locales/nl-NL/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Meer",
"assistants.plugins": "Geïntegreerde Vaardigheden",
"assistants.recentSubmits": "Recente updates",
+ "assistants.sorts.recommended": "Aanbevolen",
"assistants.sorts.createdAt": "Recent gepubliceerd",
"assistants.sorts.identifier": "Agent-ID",
"assistants.sorts.knowledgeCount": "Bibliotheken",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Deze Agent bevat bibliotheken",
"assistants.withPlugin": "Deze Agent bevat vaardigheden",
"back": "Terug naar Ontdekking",
+ "category.assistant.discover": "Ontdekking",
"category.assistant.academic": "Academisch",
"category.assistant.all": "Alle",
"category.assistant.career": "Carrière",
diff --git a/locales/pl-PL/discover.json b/locales/pl-PL/discover.json
index 525191fc8fe..d5ce1b23a0d 100644
--- a/locales/pl-PL/discover.json
+++ b/locales/pl-PL/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Więcej",
"assistants.plugins": "Zintegrowane Umiejętności",
"assistants.recentSubmits": "Ostatnie aktualizacje",
+ "assistants.sorts.recommended": "Polecane",
"assistants.sorts.createdAt": "Najnowsze publikacje",
"assistants.sorts.identifier": "ID Agenta",
"assistants.sorts.knowledgeCount": "Biblioteki",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Ten Agent zawiera Biblioteki",
"assistants.withPlugin": "Ten Agent zawiera Umiejętności",
"back": "Powrót do Odkrywania",
+ "category.assistant.discover": "Odkrywanie",
"category.assistant.academic": "Akademickie",
"category.assistant.all": "Wszystkie",
"category.assistant.career": "Kariera",
diff --git a/locales/pt-BR/discover.json b/locales/pt-BR/discover.json
index 9da11e15e49..95906b62c09 100644
--- a/locales/pt-BR/discover.json
+++ b/locales/pt-BR/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Mais",
"assistants.plugins": "Habilidades Integradas",
"assistants.recentSubmits": "Atualizações Recentes",
+ "assistants.sorts.recommended": "Recomendado",
"assistants.sorts.createdAt": "Recentemente Publicado",
"assistants.sorts.identifier": "ID do Agente",
"assistants.sorts.knowledgeCount": "Bibliotecas",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Este Agente inclui Bibliotecas",
"assistants.withPlugin": "Este Agente inclui Habilidades",
"back": "Voltar para Descoberta",
+ "category.assistant.discover": "Descoberta",
"category.assistant.academic": "Acadêmico",
"category.assistant.all": "Todos",
"category.assistant.career": "Carreira",
diff --git a/locales/ru-RU/discover.json b/locales/ru-RU/discover.json
index 62bf8b8e98a..c4678133e95 100644
--- a/locales/ru-RU/discover.json
+++ b/locales/ru-RU/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Ещё",
"assistants.plugins": "Интегрированные навыки",
"assistants.recentSubmits": "Недавние обновления",
+ "assistants.sorts.recommended": "Рекомендованные",
"assistants.sorts.createdAt": "Недавно опубликованные",
"assistants.sorts.identifier": "ID агента",
"assistants.sorts.knowledgeCount": "Библиотеки",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Этот агент использует библиотеки",
"assistants.withPlugin": "Этот агент использует навыки",
"back": "Назад к поиску",
+ "category.assistant.discover": "Обзор",
"category.assistant.academic": "Академия",
"category.assistant.all": "Все",
"category.assistant.career": "Карьера",
diff --git a/locales/tr-TR/discover.json b/locales/tr-TR/discover.json
index a5c06752ed2..1b927a3d182 100644
--- a/locales/tr-TR/discover.json
+++ b/locales/tr-TR/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Daha Fazla",
"assistants.plugins": "Entegre Beceriler",
"assistants.recentSubmits": "Son Güncellemeler",
+ "assistants.sorts.recommended": "Önerilen",
"assistants.sorts.createdAt": "Yeni Yayınlananlar",
"assistants.sorts.identifier": "Ajans Kimliği",
"assistants.sorts.knowledgeCount": "Kütüphaneler",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Bu Ajans Kütüphaneler içerir",
"assistants.withPlugin": "Bu Ajans Beceriler içerir",
"back": "Keşfe Geri Dön",
+ "category.assistant.discover": "Keşfet",
"category.assistant.academic": "Akademik",
"category.assistant.all": "Tümü",
"category.assistant.career": "Kariyer",
diff --git a/locales/vi-VN/discover.json b/locales/vi-VN/discover.json
index 7fc4806a955..4a77c2a3c58 100644
--- a/locales/vi-VN/discover.json
+++ b/locales/vi-VN/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "Xem thêm",
"assistants.plugins": "Kỹ năng tích hợp",
"assistants.recentSubmits": "Cập nhật gần đây",
+ "assistants.sorts.recommended": "Đề xuất",
"assistants.sorts.createdAt": "Phát hành gần đây",
"assistants.sorts.identifier": "ID Tác nhân",
"assistants.sorts.knowledgeCount": "Số Thư viện",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "Tác nhân này bao gồm Thư viện",
"assistants.withPlugin": "Tác nhân này bao gồm Kỹ năng",
"back": "Quay lại Khám phá",
+ "category.assistant.discover": "Khám phá",
"category.assistant.academic": "Học thuật",
"category.assistant.all": "Tất cả",
"category.assistant.career": "Nghề nghiệp",
diff --git a/locales/zh-CN/discover.json b/locales/zh-CN/discover.json
index 96f3cffec0a..34902c68220 100644
--- a/locales/zh-CN/discover.json
+++ b/locales/zh-CN/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "更多",
"assistants.plugins": "集成技能",
"assistants.recentSubmits": "最近更新",
+ "assistants.sorts.recommended": "推荐",
"assistants.sorts.createdAt": "最近发布",
"assistants.sorts.identifier": "助理 ID",
"assistants.sorts.knowledgeCount": "资源库数量",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "该助理附带资源库",
"assistants.withPlugin": "该助理附带技能",
"back": "返回发现",
+ "category.assistant.discover": "发现",
"category.assistant.academic": "学术",
"category.assistant.all": "全部",
"category.assistant.career": "职业",
diff --git a/locales/zh-TW/discover.json b/locales/zh-TW/discover.json
index 18e372ac886..449a8099612 100644
--- a/locales/zh-TW/discover.json
+++ b/locales/zh-TW/discover.json
@@ -56,6 +56,7 @@
"assistants.more": "更多",
"assistants.plugins": "集成插件",
"assistants.recentSubmits": "最近更新",
+ "assistants.sorts.recommended": "推薦",
"assistants.sorts.createdAt": "最近發布",
"assistants.sorts.identifier": "助理 ID",
"assistants.sorts.knowledgeCount": "資源庫數量",
@@ -82,6 +83,7 @@
"assistants.withKnowledge": "此助手附帶資源庫",
"assistants.withPlugin": "該助理附帶外掛",
"back": "返回發現",
+ "category.assistant.discover": "發現",
"category.assistant.academic": "學術",
"category.assistant.all": "全部",
"category.assistant.career": "職業",
diff --git a/packages/types/src/discover/assistants.ts b/packages/types/src/discover/assistants.ts
index a63b0ba1eec..f380229bd78 100644
--- a/packages/types/src/discover/assistants.ts
+++ b/packages/types/src/discover/assistants.ts
@@ -8,6 +8,7 @@ export enum AssistantCategory {
Career = 'career',
CopyWriting = 'copywriting',
Design = 'design',
+ Discover = 'discover',
Education = 'education',
Emotions = 'emotions',
Entertainment = 'entertainment',
@@ -17,7 +18,7 @@ export enum AssistantCategory {
Marketing = 'marketing',
Office = 'office',
Programming = 'programming',
- Translation = 'translation',
+ Translation = 'translation'
}
export enum AssistantSorts {
@@ -26,8 +27,9 @@ export enum AssistantSorts {
KnowledgeCount = 'knowledgeCount',
MyOwn = 'myown',
PluginCount = 'pluginCount',
+ Recommended = 'recommended',
Title = 'title',
- TokenUsage = 'tokenUsage',
+ TokenUsage = 'tokenUsage'
}
export enum AssistantNavKey {
diff --git a/src/app/[variants]/(main)/community/(list)/(home)/index.tsx b/src/app/[variants]/(main)/community/(list)/(home)/index.tsx
index 6bb91f79df6..d7bab5a53ac 100644
--- a/src/app/[variants]/(main)/community/(list)/(home)/index.tsx
+++ b/src/app/[variants]/(main)/community/(list)/(home)/index.tsx
@@ -4,7 +4,7 @@ import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { useDiscoverStore } from '@/store/discover';
-import { McpSorts } from '@/types/discover';
+import { McpSorts, AssistantSorts } from '@/types/discover';
import Title from '../../components/Title';
import AssistantList from '../assistant/features/List';
@@ -19,6 +19,7 @@ const HomePage = memo(() => {
const { data: assistantList, isLoading: assistantLoading } = useAssistantList({
page: 1,
pageSize: 12,
+ sort: AssistantSorts.Recommended,
});
const { data: mcpList, isLoading: pluginLoading } = useMcpList({
diff --git a/src/app/[variants]/(main)/community/(list)/assistant/features/Category/useCategory.tsx b/src/app/[variants]/(main)/community/(list)/assistant/features/Category/useCategory.tsx
index 960bbda136c..ef8d2e585ff 100644
--- a/src/app/[variants]/(main)/community/(list)/assistant/features/Category/useCategory.tsx
+++ b/src/app/[variants]/(main)/community/(list)/assistant/features/Category/useCategory.tsx
@@ -14,6 +14,7 @@ import {
PencilIcon,
PrinterIcon,
TerminalSquareIcon,
+ CompassIcon,
} from 'lucide-react';
import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
@@ -25,6 +26,11 @@ export const useCategory = () => {
return useMemo(
() => [
+ {
+ icon: CompassIcon,
+ key: AssistantCategory.Discover,
+ label: t('category.assistant.discover'),
+ },
{
icon: LayoutPanelTop,
key: AssistantCategory.All,
diff --git a/src/app/[variants]/(main)/community/(list)/assistant/index.tsx b/src/app/[variants]/(main)/community/(list)/assistant/index.tsx
index 4c643a82d77..69ddce02550 100644
--- a/src/app/[variants]/(main)/community/(list)/assistant/index.tsx
+++ b/src/app/[variants]/(main)/community/(list)/assistant/index.tsx
@@ -5,7 +5,7 @@ import { memo } from 'react';
import { useQuery } from '@/hooks/useQuery';
import { useDiscoverStore } from '@/store/discover';
-import { type AssistantQueryParams, DiscoverTab } from '@/types/discover';
+import { type AssistantQueryParams, AssistantSorts, DiscoverTab } from '@/types/discover';
import Pagination from '../features/Pagination';
import List from './features/List';
@@ -20,7 +20,7 @@ const AssistantPage = memo(() => {
page,
pageSize: 21,
q,
- sort,
+ sort: sort ?? AssistantSorts.Recommended,
source,
});
diff --git a/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx b/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx
index 776825b6f3a..97ab6119e15 100644
--- a/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx
+++ b/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx
@@ -27,6 +27,10 @@ const SortButton = memo(() => {
switch (activeTab) {
case DiscoverTab.Assistants: {
const baseItems = [
+ {
+ key: AssistantSorts.Recommended,
+ label: t('assistants.sorts.recommended'),
+ },
{
key: AssistantSorts.CreatedAt,
label: t('assistants.sorts.createdAt'),
diff --git a/src/locales/default/discover.ts b/src/locales/default/discover.ts
index de991a00826..cda80bc17e9 100644
--- a/src/locales/default/discover.ts
+++ b/src/locales/default/discover.ts
@@ -59,6 +59,7 @@ export default {
'assistants.more': 'More',
'assistants.plugins': 'Integrated Skills',
'assistants.recentSubmits': 'Recent Updates',
+ 'assistants.sorts.recommended': 'Recommended',
'assistants.sorts.createdAt': 'Recently Published',
'assistants.sorts.identifier': 'Agent ID',
'assistants.sorts.knowledgeCount': 'Libraries',
@@ -89,6 +90,7 @@ export default {
'assistants.withKnowledge': 'This Agent includes Libraries',
'assistants.withPlugin': 'This Agent includes Skills',
'back': 'Back to Discovery',
+ 'category.assistant.discover': 'Discover',
'category.assistant.academic': 'Academic',
'category.assistant.all': 'All',
'category.assistant.career': 'Career',