🤯 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): replace the daily brief with a triaged home inbox (#17194)
Arvin Xu3d72010018c8
diff --git a/apps/server/src/routers/lambda/topic.ts b/apps/server/src/routers/lambda/topic.tsindex 9972efd7bc1..d908aca5ae3 100644--- a/apps/server/src/routers/lambda/topic.ts+++ b/apps/server/src/routers/lambda/topic.ts@@ -411,11 +411,16 @@ export const topicRouter = router({.object({pageSize: z.number().max(500).optional(),statuses: z.array(z.string()).optional(),+ withLastMessage: z.boolean().optional(),}).optional(),).query(async ({ input, ctx }) => {- return ctx.topicModel.queryTopics({ pageSize: input?.pageSize, statuses: input?.statuses });+ return ctx.topicModel.queryTopics({+ pageSize: input?.pageSize,+ statuses: input?.statuses,+ withLastMessage: input?.withLastMessage,+ });}),getShareInfo: topicProcedurediff --git a/apps/server/src/services/brief/index.ts b/apps/server/src/services/brief/index.tsindex 8f68eb89e2d..4124eefd131 100644--- a/apps/server/src/services/brief/index.ts+++ b/apps/server/src/services/brief/index.ts@@ -19,6 +19,9 @@ export type BriefWithAgent = BriefItem & {agent: AgentAvatarInfo | null;/** Agents related to this brief, ordered with the direct producing agent before task-tree agents. */agents: AgentAvatarInfo[];+ /** Parent task's workspace-scoped ref (`T-12`) — lets an inbox row name the task it belongs to. */+ taskIdentifier?: string | null;+ taskName?: string | null;/** Parent task's runtime status — `scheduled` marks a task parked between automated runs. */taskStatus: TaskStatus | null;};@@ -158,7 +161,16 @@ export class BriefService {async listUnresolved(): Promise<BriefWithAgent[]> {const rows = await this.briefModel.listUnresolvedEnriched();return rows.map(- ({ brief, agentRowId, agentAvatar, agentBackgroundColor, agentTitle, taskStatus }) => ({+ ({+ brief,+ agentRowId,+ agentAvatar,+ agentBackgroundColor,+ agentTitle,+ taskIdentifier,+ taskName,+ taskStatus,+ }) => ({...brief,agent: agentRowId? {@@ -169,6 +181,8 @@ export class BriefService {}: null,agents: [],+ taskIdentifier,+ taskName,taskStatus: (taskStatus as TaskStatus) ?? null,}),);diff --git a/locales/ar/chat.json b/locales/ar/chat.jsonindex d15974f71bd..d7f08c6fd67 100644--- a/locales/ar/chat.json+++ b/locales/ar/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "تفاصيل","knowledgeBase.library.action.remove": "إزالة","knowledgeBase.library.title": "الملفات / المكتبات",+ "knowledgeBase.related.empty": "لا توجد ملفات أو مكتبات ذات صلة","knowledgeBase.relativeFilesOrLibraries": "الملفات/المكتبات ذات الصلة","knowledgeBase.title": "المكتبة","knowledgeBase.uploadGuide": "يمكن عرض الملفات المرفوعة في قسم 'الموارد'.",diff --git a/locales/ar/home.json b/locales/ar/home.jsonindex 8275b9495b7..62890b21004 100644--- a/locales/ar/home.json+++ b/locales/ar/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "جرّب الآن","homePromoBanner.dismiss": "تجاهل","homePromoBanner.label": "{{model}} متاح الآن",+ "inbox.needsYou.title": "يحتاج إليك",+ "inbox.news.subtitle": "لا شيء لتقرره - مجرد نظرة",+ "inbox.news.title": "الملخص اليومي",+ "inbox.running.title": "{{count}} مهمة قيد التشغيل",+ "inbox.running.title_plural": "{{count}} مهام قيد التشغيل",+ "inbox.unread.followUp": "متابعة",+ "inbox.unread.followUpPlaceholder": "رد للمتابعة في هذه المحادثة...",+ "inbox.unread.title": "غير مقروء",+ "inbox.unread.viewChat": "عرض المحادثة","project.create": "مشروع جديد","project.deleteConfirm": "سيتم حذف هذا المشروع ولن يمكن استعادته. أكد للمتابعة.","recommendations.heteroAgent.cta": "أضف الوكيل",diff --git a/locales/ar/plugin.json b/locales/ar/plugin.jsonindex 8d8df054fa8..c6b80eaf521 100644--- a/locales/ar/plugin.json+++ b/locales/ar/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "تعليمات","builtins.lobe-claude-code.agent.result": "النتيجة","builtins.lobe-claude-code.askUserQuestion.noAnswer": "لم يتم تلقي إجابة — استمر النموذج دون مدخلاتهم.",- "builtins.lobe-claude-code.askUserQuestion.question": "سؤال",- "builtins.lobe-claude-code.askUserQuestion.reply": "رد",- "builtins.lobe-claude-code.askUserQuestion.selected": "محدد",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "لم يتم الرد","builtins.lobe-claude-code.sendMessage.queued": "في انتظار الإرسال","builtins.lobe-claude-code.sendMessage.title": "إرسال رسالة","builtins.lobe-claude-code.task.create.completed": "تم إنشاء المهمة: ",diff --git a/locales/bg-BG/chat.json b/locales/bg-BG/chat.jsonindex a6bef37b054..c333986ddb3 100644--- a/locales/bg-BG/chat.json+++ b/locales/bg-BG/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Детайли","knowledgeBase.library.action.remove": "Премахни","knowledgeBase.library.title": "Файлове / Библиотеки",+ "knowledgeBase.related.empty": "Няма свързани файлове или библиотеки","knowledgeBase.relativeFilesOrLibraries": "Свързани файлове/библиотеки","knowledgeBase.title": "Библиотека","knowledgeBase.uploadGuide": "Качените файлове могат да се видят в секцията 'Ресурси'.",diff --git a/locales/bg-BG/home.json b/locales/bg-BG/home.jsonindex b13ff41a599..805ffe5a4ef 100644--- a/locales/bg-BG/home.json+++ b/locales/bg-BG/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Опитайте сега","homePromoBanner.dismiss": "Затвори","homePromoBanner.label": "{{model}} вече е наличен",+ "inbox.needsYou.title": "Има нужда от вас",+ "inbox.news.subtitle": "Няма какво да решавате — просто погледнете",+ "inbox.news.title": "Ежедневен бюлетин",+ "inbox.running.title": "{{count}} задача в процес",+ "inbox.running.title_plural": "{{count}} задачи в процес",+ "inbox.unread.followUp": "Последвайте",+ "inbox.unread.followUpPlaceholder": "Отговорете, за да продължите този разговор...",+ "inbox.unread.title": "Непрочетено",+ "inbox.unread.viewChat": "Преглед на чата","project.create": "Нов проект","project.deleteConfirm": "Този проект ще бъде изтрит и не може да бъде възстановен. Потвърдете, за да продължите.","recommendations.heteroAgent.cta": "Добавяне на агент",diff --git a/locales/bg-BG/plugin.json b/locales/bg-BG/plugin.jsonindex b085ba9eceb..2023ba7a0b0 100644--- a/locales/bg-BG/plugin.json+++ b/locales/bg-BG/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Инструкция","builtins.lobe-claude-code.agent.result": "Резултат","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Не е получен отговор — моделът продължи без тяхното участие.",- "builtins.lobe-claude-code.askUserQuestion.question": "Въпрос",- "builtins.lobe-claude-code.askUserQuestion.reply": "Отговор",- "builtins.lobe-claude-code.askUserQuestion.selected": "Избрано",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Не е отговорено","builtins.lobe-claude-code.sendMessage.queued": "Поставено на опашката за доставка","builtins.lobe-claude-code.sendMessage.title": "Изпрати съобщение","builtins.lobe-claude-code.task.create.completed": "Задачата е създадена: ",diff --git a/locales/de-DE/chat.json b/locales/de-DE/chat.jsonindex c182e14883d..decfdbd5784 100644--- a/locales/de-DE/chat.json+++ b/locales/de-DE/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Details","knowledgeBase.library.action.remove": "Entfernen","knowledgeBase.library.title": "Dateien / Bibliotheken",+ "knowledgeBase.related.empty": "Keine zugehörigen Dateien oder Bibliotheken","knowledgeBase.relativeFilesOrLibraries": "Verwandte Dateien/Bibliotheken","knowledgeBase.title": "Bibliothek","knowledgeBase.uploadGuide": "Hochgeladene Dateien sind im Bereich 'Ressourcen' einsehbar.",diff --git a/locales/de-DE/home.json b/locales/de-DE/home.jsonindex a0a1462dad4..f7dbcb1aeef 100644--- a/locales/de-DE/home.json+++ b/locales/de-DE/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Jetzt ausprobieren","homePromoBanner.dismiss": "Schließen","homePromoBanner.label": "{{model}} ist jetzt verfügbar",+ "inbox.needsYou.title": "Braucht dich",+ "inbox.news.subtitle": "Nichts zu entscheiden – nur ein Blick",+ "inbox.news.title": "Tägliche Zusammenfassung",+ "inbox.running.title": "{{count}} Aufgabe läuft",+ "inbox.running.title_plural": "{{count}} Aufgaben laufen",+ "inbox.unread.followUp": "Nachverfolgen",+ "inbox.unread.followUpPlaceholder": "Antworten, um diesen Vorgang fortzusetzen…",+ "inbox.unread.title": "Ungelesen",+ "inbox.unread.viewChat": "Chat anzeigen","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/de-DE/plugin.json b/locales/de-DE/plugin.jsonindex 6c0d3cd15af..26847f2ae72 100644--- a/locales/de-DE/plugin.json+++ b/locales/de-DE/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Anweisung","builtins.lobe-claude-code.agent.result": "Ergebnis","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Keine Antwort erhalten – Modell hat ohne deren Eingabe fortgesetzt.",- "builtins.lobe-claude-code.askUserQuestion.question": "Frage",- "builtins.lobe-claude-code.askUserQuestion.reply": "Antwort",- "builtins.lobe-claude-code.askUserQuestion.selected": "Ausgewählt",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Nicht beantwortet","builtins.lobe-claude-code.sendMessage.queued": "Zur Zustellung eingereiht","builtins.lobe-claude-code.sendMessage.title": "Nachricht senden","builtins.lobe-claude-code.task.create.completed": "Aufgabe erstellt: ",diff --git a/locales/en-US/home.json b/locales/en-US/home.jsonindex dbb70560cd5..4acbd1cc98a 100644--- a/locales/en-US/home.json+++ b/locales/en-US/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Try now","homePromoBanner.dismiss": "Dismiss","homePromoBanner.label": "{{model}} is now available",+ "inbox.needsYou.title": "Needs you",+ "inbox.news.subtitle": "Nothing to decide — just a glance",+ "inbox.news.title": "Daily brief",+ "inbox.running.title": "{{count}} task running",+ "inbox.running.title_plural": "{{count}} tasks running",+ "inbox.unread.followUp": "Follow up",+ "inbox.unread.followUpPlaceholder": "Reply to continue this run…",+ "inbox.unread.title": "Unread",+ "inbox.unread.viewChat": "View chat","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/chat.json b/locales/es-ES/chat.jsonindex fb9b20b49bf..6b3835edeab 100644--- a/locales/es-ES/chat.json+++ b/locales/es-ES/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Detalles","knowledgeBase.library.action.remove": "Eliminar","knowledgeBase.library.title": "Archivos / Bibliotecas",+ "knowledgeBase.related.empty": "No hay archivos o bibliotecas relacionadas","knowledgeBase.relativeFilesOrLibraries": "Archivos/Bibliotecas relacionadas","knowledgeBase.title": "Biblioteca","knowledgeBase.uploadGuide": "Los archivos subidos se pueden ver en la sección 'Recursos'.",diff --git a/locales/es-ES/home.json b/locales/es-ES/home.jsonindex 40b0b0618b9..799c822930a 100644--- a/locales/es-ES/home.json+++ b/locales/es-ES/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Prueba ahora","homePromoBanner.dismiss": "Cerrar","homePromoBanner.label": "{{model}} ya está disponible",+ "inbox.needsYou.title": "Te necesita",+ "inbox.news.subtitle": "Nada que decidir — solo un vistazo",+ "inbox.news.title": "Resumen diario",+ "inbox.running.title": "{{count}} tarea en ejecución",+ "inbox.running.title_plural": "{{count}} tareas en ejecución",+ "inbox.unread.followUp": "Dar seguimiento",+ "inbox.unread.followUpPlaceholder": "Responde para continuar con esta conversación…",+ "inbox.unread.title": "Sin leer",+ "inbox.unread.viewChat": "Ver chat","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/es-ES/plugin.json b/locales/es-ES/plugin.jsonindex c7ee885384d..43b012553d4 100644--- a/locales/es-ES/plugin.json+++ b/locales/es-ES/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Instrucción","builtins.lobe-claude-code.agent.result": "Resultado","builtins.lobe-claude-code.askUserQuestion.noAnswer": "No se recibió respuesta: el modelo continuó sin su entrada.",- "builtins.lobe-claude-code.askUserQuestion.question": "Pregunta",- "builtins.lobe-claude-code.askUserQuestion.reply": "Respuesta",- "builtins.lobe-claude-code.askUserQuestion.selected": "Seleccionado",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "No respondido","builtins.lobe-claude-code.sendMessage.queued": "En cola para entrega","builtins.lobe-claude-code.sendMessage.title": "Enviar mensaje","builtins.lobe-claude-code.task.create.completed": "Tarea creada: ",diff --git a/locales/fa-IR/chat.json b/locales/fa-IR/chat.jsonindex 215437c701c..5b23f2b064c 100644--- a/locales/fa-IR/chat.json+++ b/locales/fa-IR/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "جزئیات","knowledgeBase.library.action.remove": "حذف","knowledgeBase.library.title": "فایلها / کتابخانهها",+ "knowledgeBase.related.empty": "هیچ فایل یا کتابخانه مرتبطی وجود ندارد","knowledgeBase.relativeFilesOrLibraries": "فایلها/کتابخانههای مرتبط","knowledgeBase.title": "کتابخانه","knowledgeBase.uploadGuide": "فایلهای بارگذاریشده در بخش «منابع» قابل مشاهده هستند.",diff --git a/locales/fa-IR/home.json b/locales/fa-IR/home.jsonindex 01335262b41..1d52043a6df 100644--- a/locales/fa-IR/home.json+++ b/locales/fa-IR/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "همین حالا امتحان کنید","homePromoBanner.dismiss": "بستن","homePromoBanner.label": "{{model}} اکنون در دسترس است",+ "inbox.needsYou.title": "به شما نیاز دارد",+ "inbox.news.subtitle": "چیزی برای تصمیمگیری نیست — فقط یک نگاه",+ "inbox.news.title": "خلاصه روزانه",+ "inbox.running.title": "{{count}} وظیفه در حال اجرا",+ "inbox.running.title_plural": "{{count}} وظیفه در حال اجرا",+ "inbox.unread.followUp": "پیگیری",+ "inbox.unread.followUpPlaceholder": "پاسخ دهید تا این مکالمه ادامه یابد…",+ "inbox.unread.title": "خوانده نشده",+ "inbox.unread.viewChat": "مشاهده چت","project.create": "پروژه جدید","project.deleteConfirm": "این پروژه حذف خواهد شد و امکان بازیابی آن وجود ندارد. برای ادامه تأیید کنید.","recommendations.heteroAgent.cta": "افزودن عامل",diff --git a/locales/fa-IR/plugin.json b/locales/fa-IR/plugin.jsonindex 5def962ea33..196855b419c 100644--- a/locales/fa-IR/plugin.json+++ b/locales/fa-IR/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "دستورالعمل","builtins.lobe-claude-code.agent.result": "نتیجه","builtins.lobe-claude-code.askUserQuestion.noAnswer": "پاسخی دریافت نشد — مدل بدون ورودی آنها ادامه داد.",- "builtins.lobe-claude-code.askUserQuestion.question": "سؤال",- "builtins.lobe-claude-code.askUserQuestion.reply": "پاسخ",- "builtins.lobe-claude-code.askUserQuestion.selected": "انتخاب شده",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "پاسخ داده نشده","builtins.lobe-claude-code.sendMessage.queued": "در صف ارسال","builtins.lobe-claude-code.sendMessage.title": "ارسال پیام","builtins.lobe-claude-code.task.create.completed": "وظیفه ایجاد شد: ",diff --git a/locales/fr-FR/chat.json b/locales/fr-FR/chat.jsonindex f7461e4dec6..8d5236ac16b 100644--- a/locales/fr-FR/chat.json+++ b/locales/fr-FR/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Détails","knowledgeBase.library.action.remove": "Supprimer","knowledgeBase.library.title": "Fichiers / Bibliothèques",+ "knowledgeBase.related.empty": "Aucun fichier ou bibliothèque associé","knowledgeBase.relativeFilesOrLibraries": "Fichiers/Bibliothèques associés","knowledgeBase.title": "Bibliothèque","knowledgeBase.uploadGuide": "Les fichiers téléchargés peuvent être consultés dans la section « Ressources ».",diff --git a/locales/fr-FR/home.json b/locales/fr-FR/home.jsonindex 1907743fc25..89a11f2a6e8 100644--- a/locales/fr-FR/home.json+++ b/locales/fr-FR/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Essayez maintenant","homePromoBanner.dismiss": "Fermer","homePromoBanner.label": "{{model}} est maintenant disponible",+ "inbox.needsYou.title": "A besoin de vous",+ "inbox.news.subtitle": "Rien à décider — juste un coup d'œil",+ "inbox.news.title": "Résumé quotidien",+ "inbox.running.title": "{{count}} tâche en cours",+ "inbox.running.title_plural": "{{count}} tâches en cours",+ "inbox.unread.followUp": "Faire un suivi",+ "inbox.unread.followUpPlaceholder": "Répondez pour continuer cette conversation…",+ "inbox.unread.title": "Non lu",+ "inbox.unread.viewChat": "Voir la discussion","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/fr-FR/plugin.json b/locales/fr-FR/plugin.jsonindex ae3885ed2ed..539a83b7da7 100644--- a/locales/fr-FR/plugin.json+++ b/locales/fr-FR/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Consigne","builtins.lobe-claude-code.agent.result": "Résultat","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Aucune réponse reçue — le modèle a continué sans leur contribution.",- "builtins.lobe-claude-code.askUserQuestion.question": "Question",- "builtins.lobe-claude-code.askUserQuestion.reply": "Réponse",- "builtins.lobe-claude-code.askUserQuestion.selected": "Sélectionné",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Non répondu","builtins.lobe-claude-code.sendMessage.queued": "En file d'attente pour la livraison","builtins.lobe-claude-code.sendMessage.title": "Envoyer un message","builtins.lobe-claude-code.task.create.completed": "Tâche créée : ",diff --git a/locales/it-IT/chat.json b/locales/it-IT/chat.jsonindex 1590ed08506..feb7d6579fc 100644--- a/locales/it-IT/chat.json+++ b/locales/it-IT/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Dettagli","knowledgeBase.library.action.remove": "Rimuovi","knowledgeBase.library.title": "File / Librerie",+ "knowledgeBase.related.empty": "Nessun file o libreria correlata","knowledgeBase.relativeFilesOrLibraries": "File/Librerie Correlati","knowledgeBase.title": "Libreria","knowledgeBase.uploadGuide": "I file caricati possono essere visualizzati nella sezione 'Risorse'.",diff --git a/locales/it-IT/home.json b/locales/it-IT/home.jsonindex de04e2cae13..16f262093fd 100644--- a/locales/it-IT/home.json+++ b/locales/it-IT/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Prova ora","homePromoBanner.dismiss": "Chiudi","homePromoBanner.label": "{{model}} è ora disponibile",+ "inbox.needsYou.title": "Ha bisogno di te",+ "inbox.news.subtitle": "Niente da decidere — solo uno sguardo",+ "inbox.news.title": "Riepilogo quotidiano",+ "inbox.running.title": "{{count}} attività in corso",+ "inbox.running.title_plural": "{{count}} attività in corso",+ "inbox.unread.followUp": "Segui",+ "inbox.unread.followUpPlaceholder": "Rispondi per continuare questa conversazione…",+ "inbox.unread.title": "Non letti",+ "inbox.unread.viewChat": "Visualizza chat","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/it-IT/plugin.json b/locales/it-IT/plugin.jsonindex a4230b5bc56..2f330b77f03 100644--- a/locales/it-IT/plugin.json+++ b/locales/it-IT/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Istruzione","builtins.lobe-claude-code.agent.result": "Risultato","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Nessuna risposta ricevuta — il modello ha continuato senza il loro input.",- "builtins.lobe-claude-code.askUserQuestion.question": "Domanda",- "builtins.lobe-claude-code.askUserQuestion.reply": "Risposta",- "builtins.lobe-claude-code.askUserQuestion.selected": "Selezionato",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Non risposto","builtins.lobe-claude-code.sendMessage.queued": "In coda per la consegna","builtins.lobe-claude-code.sendMessage.title": "Invia messaggio","builtins.lobe-claude-code.task.create.completed": "Attività creata: ",diff --git a/locales/ja-JP/chat.json b/locales/ja-JP/chat.jsonindex e0dde1e9036..8f56f43efbd 100644--- a/locales/ja-JP/chat.json+++ b/locales/ja-JP/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "詳細","knowledgeBase.library.action.remove": "削除","knowledgeBase.library.title": "ファイル / ライブラリ",+ "knowledgeBase.related.empty": "関連するファイルやライブラリはありません","knowledgeBase.relativeFilesOrLibraries": "関連ファイル / ライブラリ","knowledgeBase.title": "ライブラリ","knowledgeBase.uploadGuide": "アップロードしたファイルは「リソース」で確認できます",diff --git a/locales/ja-JP/home.json b/locales/ja-JP/home.jsonindex dd3bc701234..efc0da0a39d 100644--- a/locales/ja-JP/home.json+++ b/locales/ja-JP/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "今すぐ試す","homePromoBanner.dismiss": "閉じる","homePromoBanner.label": "{{model}}が利用可能になりました",+ "inbox.needsYou.title": "あなたが必要です",+ "inbox.news.subtitle": "決めることはありません — ただ一目見るだけ",+ "inbox.news.title": "デイリーブリーフ",+ "inbox.running.title": "{{count}} 件のタスクが実行中",+ "inbox.running.title_plural": "{{count}} 件のタスクが実行中",+ "inbox.unread.followUp": "フォローアップ",+ "inbox.unread.followUpPlaceholder": "返信してこのランを続行してください…",+ "inbox.unread.title": "未読",+ "inbox.unread.viewChat": "チャットを見る","project.create": "新しいプロジェクトを作成","project.deleteConfirm": "このプロジェクトは削除され、復元できません。続行するには確認してください。","recommendations.heteroAgent.cta": "エージェントを追加",diff --git a/locales/ja-JP/plugin.json b/locales/ja-JP/plugin.jsonindex c5ea88c8dd7..b9caf94d81b 100644--- a/locales/ja-JP/plugin.json+++ b/locales/ja-JP/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "指示","builtins.lobe-claude-code.agent.result": "結果","builtins.lobe-claude-code.askUserQuestion.noAnswer": "回答が受信されませんでした — モデルはユーザーの入力なしで続行しました。",- "builtins.lobe-claude-code.askUserQuestion.question": "質問",- "builtins.lobe-claude-code.askUserQuestion.reply": "返信",- "builtins.lobe-claude-code.askUserQuestion.selected": "選択済み",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "未回答","builtins.lobe-claude-code.sendMessage.queued": "配信待ち","builtins.lobe-claude-code.sendMessage.title": "メッセージを送信","builtins.lobe-claude-code.task.create.completed": "タスクが作成されました: ",diff --git a/locales/ko-KR/chat.json b/locales/ko-KR/chat.jsonindex d6ebb56fafc..7e6fbe8ef90 100644--- a/locales/ko-KR/chat.json+++ b/locales/ko-KR/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "상세","knowledgeBase.library.action.remove": "제거","knowledgeBase.library.title": "파일/자료실",+ "knowledgeBase.related.empty": "관련된 파일이나 라이브러리가 없습니다","knowledgeBase.relativeFilesOrLibraries": "관련 파일/자료실","knowledgeBase.title": "자료실","knowledgeBase.uploadGuide": "업로드한 파일은 '자료'에서 확인할 수 있습니다",diff --git a/locales/ko-KR/home.json b/locales/ko-KR/home.jsonindex d675b0d5bbd..345175c3e4f 100644--- a/locales/ko-KR/home.json+++ b/locales/ko-KR/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "지금 시도하기","homePromoBanner.dismiss": "닫기","homePromoBanner.label": "{{model}}이(가) 이제 사용 가능합니다",+ "inbox.needsYou.title": "당신이 필요합니다",+ "inbox.news.subtitle": "결정할 필요 없음 — 한눈에 보기",+ "inbox.news.title": "일일 요약",+ "inbox.running.title": "{{count}}개의 작업 실행 중",+ "inbox.running.title_plural": "{{count}}개의 작업 실행 중",+ "inbox.unread.followUp": "후속 조치",+ "inbox.unread.followUpPlaceholder": "이 실행을 계속하려면 답장하세요…",+ "inbox.unread.title": "읽지 않음",+ "inbox.unread.viewChat": "채팅 보기","project.create": "새 프로젝트 만들기","project.deleteConfirm": "이 프로젝트는 삭제되며 복구할 수 없습니다. 계속하려면 확인하세요.","recommendations.heteroAgent.cta": "에이전트 추가",diff --git a/locales/ko-KR/plugin.json b/locales/ko-KR/plugin.jsonindex d0dd4139af4..2f8c8108458 100644--- a/locales/ko-KR/plugin.json+++ b/locales/ko-KR/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "지시사항","builtins.lobe-claude-code.agent.result": "결과","builtins.lobe-claude-code.askUserQuestion.noAnswer": "답변을 받지 못했습니다 — 모델이 사용자 입력 없이 계속 진행했습니다.",- "builtins.lobe-claude-code.askUserQuestion.question": "질문",- "builtins.lobe-claude-code.askUserQuestion.reply": "답변",- "builtins.lobe-claude-code.askUserQuestion.selected": "선택됨",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "답변되지 않음","builtins.lobe-claude-code.sendMessage.queued": "전송 대기 중","builtins.lobe-claude-code.sendMessage.title": "메시지 보내기","builtins.lobe-claude-code.task.create.completed": "작업 생성됨: ",diff --git a/locales/nl-NL/chat.json b/locales/nl-NL/chat.jsonindex 5429e4377be..13677c27b98 100644--- a/locales/nl-NL/chat.json+++ b/locales/nl-NL/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Details","knowledgeBase.library.action.remove": "Verwijderen","knowledgeBase.library.title": "Bestanden / Bibliotheken",+ "knowledgeBase.related.empty": "Geen gerelateerde bestanden of bibliotheken","knowledgeBase.relativeFilesOrLibraries": "Gerelateerde bestanden/bibliotheken","knowledgeBase.title": "Bibliotheek","knowledgeBase.uploadGuide": "Geüploade bestanden zijn te bekijken in het gedeelte 'Bronnen'.",diff --git a/locales/nl-NL/home.json b/locales/nl-NL/home.jsonindex 93900496bcb..3535e2f3a32 100644--- a/locales/nl-NL/home.json+++ b/locales/nl-NL/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Probeer nu","homePromoBanner.dismiss": "Sluiten","homePromoBanner.label": "{{model}} is nu beschikbaar",+ "inbox.needsYou.title": "Heeft je nodig",+ "inbox.news.subtitle": "Niets te beslissen — gewoon een blik",+ "inbox.news.title": "Dagelijks overzicht",+ "inbox.running.title": "{{count}} taak actief",+ "inbox.running.title_plural": "{{count}} taken actief",+ "inbox.unread.followUp": "Volgen",+ "inbox.unread.followUpPlaceholder": "Antwoord om deze sessie voort te zetten…",+ "inbox.unread.title": "Ongelezen",+ "inbox.unread.viewChat": "Bekijk chat","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/nl-NL/plugin.json b/locales/nl-NL/plugin.jsonindex e67cd2a12ca..2189a66c82c 100644--- a/locales/nl-NL/plugin.json+++ b/locales/nl-NL/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Instructie","builtins.lobe-claude-code.agent.result": "Resultaat","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Geen antwoord ontvangen — model ging verder zonder hun input.",- "builtins.lobe-claude-code.askUserQuestion.question": "Vraag",- "builtins.lobe-claude-code.askUserQuestion.reply": "Antwoord",- "builtins.lobe-claude-code.askUserQuestion.selected": "Geselecteerd",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Niet beantwoord","builtins.lobe-claude-code.sendMessage.queued": "In de wachtrij voor bezorging","builtins.lobe-claude-code.sendMessage.title": "Bericht verzenden","builtins.lobe-claude-code.task.create.completed": "Taak aangemaakt: ",diff --git a/locales/pl-PL/chat.json b/locales/pl-PL/chat.jsonindex 13c721fe126..5769a4efb75 100644--- a/locales/pl-PL/chat.json+++ b/locales/pl-PL/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Szczegóły","knowledgeBase.library.action.remove": "Usuń","knowledgeBase.library.title": "Pliki / Biblioteki",+ "knowledgeBase.related.empty": "Brak powiązanych plików lub bibliotek","knowledgeBase.relativeFilesOrLibraries": "Powiązane pliki/biblioteki","knowledgeBase.title": "Biblioteka","knowledgeBase.uploadGuide": "Przesłane pliki można przeglądać w sekcji „Zasoby”.",diff --git a/locales/pl-PL/home.json b/locales/pl-PL/home.jsonindex 6b6d7148e7a..41c73086713 100644--- a/locales/pl-PL/home.json+++ b/locales/pl-PL/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Wypróbuj teraz","homePromoBanner.dismiss": "Zamknij","homePromoBanner.label": "{{model}} jest już dostępny",+ "inbox.needsYou.title": "Potrzebuje Cię",+ "inbox.news.subtitle": "Nic do zdecydowania — tylko rzut oka",+ "inbox.news.title": "Codzienny przegląd",+ "inbox.running.title": "{{count}} zadanie w toku",+ "inbox.running.title_plural": "{{count}} zadań w toku",+ "inbox.unread.followUp": "Śledź dalej",+ "inbox.unread.followUpPlaceholder": "Odpowiedz, aby kontynuować ten wątek…",+ "inbox.unread.title": "Nieprzeczytane",+ "inbox.unread.viewChat": "Zobacz czat","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/pl-PL/plugin.json b/locales/pl-PL/plugin.jsonindex 2d7bfa23ed3..62bcba4d2e1 100644--- a/locales/pl-PL/plugin.json+++ b/locales/pl-PL/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Instrukcja","builtins.lobe-claude-code.agent.result": "Wynik","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Nie otrzymano odpowiedzi — model kontynuował bez ich wkładu.",- "builtins.lobe-claude-code.askUserQuestion.question": "Pytanie",- "builtins.lobe-claude-code.askUserQuestion.reply": "Odpowiedź",- "builtins.lobe-claude-code.askUserQuestion.selected": "Wybrano",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Nie odpowiedziano","builtins.lobe-claude-code.sendMessage.queued": "Zakolejkowane do dostarczenia","builtins.lobe-claude-code.sendMessage.title": "Wyślij wiadomość","builtins.lobe-claude-code.task.create.completed": "Zadanie utworzone: ",diff --git a/locales/pt-BR/chat.json b/locales/pt-BR/chat.jsonindex 1203ef16d03..b8073d316d4 100644--- a/locales/pt-BR/chat.json+++ b/locales/pt-BR/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Detalhes","knowledgeBase.library.action.remove": "Remover","knowledgeBase.library.title": "Arquivos / Bibliotecas",+ "knowledgeBase.related.empty": "Nenhum arquivo ou biblioteca relacionada","knowledgeBase.relativeFilesOrLibraries": "Arquivos/Bibliotecas Relacionados","knowledgeBase.title": "Biblioteca","knowledgeBase.uploadGuide": "Arquivos enviados podem ser visualizados na seção 'Recursos'.",diff --git a/locales/pt-BR/home.json b/locales/pt-BR/home.jsonindex 7b853be43ad..5f212df7304 100644--- a/locales/pt-BR/home.json+++ b/locales/pt-BR/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Experimente agora","homePromoBanner.dismiss": "Fechar","homePromoBanner.label": "{{model}} já está disponível",+ "inbox.needsYou.title": "Precisa de você",+ "inbox.news.subtitle": "Nada para decidir — apenas um olhar",+ "inbox.news.title": "Resumo diário",+ "inbox.running.title": "{{count}} tarefa em execução",+ "inbox.running.title_plural": "{{count}} tarefas em execução",+ "inbox.unread.followUp": "Acompanhar",+ "inbox.unread.followUpPlaceholder": "Responda para continuar esta conversa…",+ "inbox.unread.title": "Não lido",+ "inbox.unread.viewChat": "Ver chat","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/pt-BR/plugin.json b/locales/pt-BR/plugin.jsonindex ca356dbba1c..277353ce37d 100644--- a/locales/pt-BR/plugin.json+++ b/locales/pt-BR/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Instrução","builtins.lobe-claude-code.agent.result": "Resultado","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Nenhuma resposta recebida — o modelo continuou sem a entrada deles.",- "builtins.lobe-claude-code.askUserQuestion.question": "Pergunta",- "builtins.lobe-claude-code.askUserQuestion.reply": "Resposta",- "builtins.lobe-claude-code.askUserQuestion.selected": "Selecionado",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Não respondido","builtins.lobe-claude-code.sendMessage.queued": "Enfileirado para entrega","builtins.lobe-claude-code.sendMessage.title": "Enviar mensagem","builtins.lobe-claude-code.task.create.completed": "Tarefa criada: ",diff --git a/locales/ru-RU/chat.json b/locales/ru-RU/chat.jsonindex 53092c4d900..598368de5a5 100644--- a/locales/ru-RU/chat.json+++ b/locales/ru-RU/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Подробнее","knowledgeBase.library.action.remove": "Удалить","knowledgeBase.library.title": "Файлы / Библиотеки",+ "knowledgeBase.related.empty": "Нет связанных файлов или библиотек","knowledgeBase.relativeFilesOrLibraries": "Связанные файлы/библиотеки","knowledgeBase.title": "Библиотека","knowledgeBase.uploadGuide": "Загруженные файлы можно просмотреть в разделе «Ресурсы».",diff --git a/locales/ru-RU/home.json b/locales/ru-RU/home.jsonindex 5a87b3df148..a97e887f450 100644--- a/locales/ru-RU/home.json+++ b/locales/ru-RU/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Попробовать сейчас","homePromoBanner.dismiss": "Закрыть","homePromoBanner.label": "{{model}} теперь доступен",+ "inbox.needsYou.title": "Нуждается в вас",+ "inbox.news.subtitle": "Ничего решать — просто взгляд",+ "inbox.news.title": "Ежедневная сводка",+ "inbox.running.title": "{{count}} задача выполняется",+ "inbox.running.title_plural": "{{count}} задач выполняется",+ "inbox.unread.followUp": "Следить",+ "inbox.unread.followUpPlaceholder": "Ответьте, чтобы продолжить этот разговор…",+ "inbox.unread.title": "Непрочитанные",+ "inbox.unread.viewChat": "Просмотреть чат","project.create": "Новый проект","project.deleteConfirm": "Этот проект будет удален и не может быть восстановлен. Подтвердите, чтобы продолжить.","recommendations.heteroAgent.cta": "Добавить агента",diff --git a/locales/ru-RU/plugin.json b/locales/ru-RU/plugin.jsonindex 89102064cf7..c7612c27216 100644--- a/locales/ru-RU/plugin.json+++ b/locales/ru-RU/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Инструкция","builtins.lobe-claude-code.agent.result": "Результат","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Ответ не получен — модель продолжила без их ввода.",- "builtins.lobe-claude-code.askUserQuestion.question": "Вопрос",- "builtins.lobe-claude-code.askUserQuestion.reply": "Ответ",- "builtins.lobe-claude-code.askUserQuestion.selected": "Выбрано",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Не отвечено","builtins.lobe-claude-code.sendMessage.queued": "Поставлено в очередь для отправки","builtins.lobe-claude-code.sendMessage.title": "Отправить сообщение","builtins.lobe-claude-code.task.create.completed": "Задача создана: ",diff --git a/locales/tr-TR/chat.json b/locales/tr-TR/chat.jsonindex 66097155378..b5858ed8953 100644--- a/locales/tr-TR/chat.json+++ b/locales/tr-TR/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Ayrıntılar","knowledgeBase.library.action.remove": "Kaldır","knowledgeBase.library.title": "Dosyalar / Kütüphaneler",+ "knowledgeBase.related.empty": "İlgili dosya veya kütüphane bulunamadı","knowledgeBase.relativeFilesOrLibraries": "İlgili Dosyalar/Kütüphaneler","knowledgeBase.title": "Kütüphane","knowledgeBase.uploadGuide": "Yüklenen dosyalar 'Kaynaklar' bölümünde görüntülenebilir.",diff --git a/locales/tr-TR/home.json b/locales/tr-TR/home.jsonindex 9647b618e7c..c9cd7c1356f 100644--- a/locales/tr-TR/home.json+++ b/locales/tr-TR/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Şimdi deneyin","homePromoBanner.dismiss": "Kapat","homePromoBanner.label": "{{model}} artık mevcut",+ "inbox.needsYou.title": "Sana ihtiyaç var",+ "inbox.news.subtitle": "Karar vermeye gerek yok — sadece bir bakış",+ "inbox.news.title": "Günlük özet",+ "inbox.running.title": "{{count}} görev çalışıyor",+ "inbox.running.title_plural": "{{count}} görev çalışıyor",+ "inbox.unread.followUp": "Takip et",+ "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","project.create": "Yeni proje","project.deleteConfirm": "Bu proje silinecek ve geri alınamaz. Devam etmek için onaylayın.","recommendations.heteroAgent.cta": "Aracı Ekle",diff --git a/locales/tr-TR/plugin.json b/locales/tr-TR/plugin.jsonindex 92dac36d325..b045ff451a2 100644--- a/locales/tr-TR/plugin.json+++ b/locales/tr-TR/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Talimat","builtins.lobe-claude-code.agent.result": "Sonuç","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Yanıt alınmadı — model onların girdisi olmadan devam etti.",- "builtins.lobe-claude-code.askUserQuestion.question": "Soru",- "builtins.lobe-claude-code.askUserQuestion.reply": "Yanıt",- "builtins.lobe-claude-code.askUserQuestion.selected": "Seçildi",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Cevaplanmadı","builtins.lobe-claude-code.sendMessage.queued": "Teslimat için sıraya alındı","builtins.lobe-claude-code.sendMessage.title": "Mesaj gönder","builtins.lobe-claude-code.task.create.completed": "Görev oluşturuldu: ",diff --git a/locales/vi-VN/chat.json b/locales/vi-VN/chat.jsonindex 3ad6b66c314..6f826586c8e 100644--- a/locales/vi-VN/chat.json+++ b/locales/vi-VN/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "Chi tiết","knowledgeBase.library.action.remove": "Xóa","knowledgeBase.library.title": "Tệp / Thư viện",+ "knowledgeBase.related.empty": "Không có tệp hoặc thư viện liên quan","knowledgeBase.relativeFilesOrLibraries": "Tệp/Thư viện liên quan","knowledgeBase.title": "Thư viện","knowledgeBase.uploadGuide": "Các tệp đã tải lên có thể xem trong phần 'Tài nguyên'.",diff --git a/locales/vi-VN/home.json b/locales/vi-VN/home.jsonindex 70ecb418982..c99434ff02f 100644--- a/locales/vi-VN/home.json+++ b/locales/vi-VN/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "Thử ngay","homePromoBanner.dismiss": "Bỏ qua","homePromoBanner.label": "{{model}} hiện đã có sẵn",+ "inbox.needsYou.title": "Cần bạn",+ "inbox.news.subtitle": "Không có gì cần quyết định — chỉ cần nhìn qua",+ "inbox.news.title": "Tóm tắt hàng ngày",+ "inbox.running.title": "{{count}} nhiệm vụ đang chạy",+ "inbox.running.title_plural": "{{count}} nhiệm vụ đang chạy",+ "inbox.unread.followUp": "Theo dõi",+ "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","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/vi-VN/plugin.json b/locales/vi-VN/plugin.jsonindex 59cdb47a4ff..cec137c6892 100644--- a/locales/vi-VN/plugin.json+++ b/locales/vi-VN/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "Hướng dẫn","builtins.lobe-claude-code.agent.result": "Kết quả","builtins.lobe-claude-code.askUserQuestion.noAnswer": "Không nhận được câu trả lời — mô hình tiếp tục mà không có đầu vào của họ.",- "builtins.lobe-claude-code.askUserQuestion.question": "Câu hỏi",- "builtins.lobe-claude-code.askUserQuestion.reply": "Trả lời",- "builtins.lobe-claude-code.askUserQuestion.selected": "Đã chọn",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "Chưa trả lời","builtins.lobe-claude-code.sendMessage.queued": "Đã xếp hàng để gửi","builtins.lobe-claude-code.sendMessage.title": "Gửi tin nhắn","builtins.lobe-claude-code.task.create.completed": "Nhiệm vụ đã được tạo: ",diff --git a/locales/zh-CN/home.json b/locales/zh-CN/home.jsonindex f3d2da41274..6ca8a461ceb 100644--- a/locales/zh-CN/home.json+++ b/locales/zh-CN/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "立即体验","homePromoBanner.dismiss": "关闭","homePromoBanner.label": "{{model}} 现已上线",+ "inbox.needsYou.title": "需要你处理",+ "inbox.news.subtitle": "不需要你做决定,扫一眼就行",+ "inbox.news.title": "今日简报",+ "inbox.running.title": "{{count}} 个任务正在执行",+ "inbox.running.title_plural": "{{count}} 个任务正在执行",+ "inbox.unread.followUp": "继续追问",+ "inbox.unread.followUpPlaceholder": "回复以继续这次运行…",+ "inbox.unread.title": "未读",+ "inbox.unread.viewChat": "查看对话","project.create": "新建项目","project.deleteConfirm": "此项目将被删除且无法恢复。确认继续操作。","recommendations.heteroAgent.cta": "添加助手",diff --git a/locales/zh-TW/chat.json b/locales/zh-TW/chat.jsonindex 766f4917b0f..6de54ba7e24 100644--- a/locales/zh-TW/chat.json+++ b/locales/zh-TW/chat.json@@ -457,6 +457,7 @@"knowledgeBase.library.action.detail": "詳情","knowledgeBase.library.action.remove": "移除","knowledgeBase.library.title": "檔案/資源庫",+ "knowledgeBase.related.empty": "沒有相關的檔案或資料庫","knowledgeBase.relativeFilesOrLibraries": "關聯檔案/資源庫","knowledgeBase.title": "資源庫","knowledgeBase.uploadGuide": "上傳的檔案可在「資源」中查看喔",diff --git a/locales/zh-TW/home.json b/locales/zh-TW/home.jsonindex cd355de790c..cd739ccb059 100644--- a/locales/zh-TW/home.json+++ b/locales/zh-TW/home.json@@ -44,6 +44,15 @@"homePromoBanner.cta": "立即嘗試","homePromoBanner.dismiss": "關閉","homePromoBanner.label": "{{model}} 現已推出",+ "inbox.needsYou.title": "需要您",+ "inbox.news.subtitle": "無需決定 — 只需一瞥",+ "inbox.news.title": "每日簡報",+ "inbox.running.title": "{{count}} 項任務正在執行",+ "inbox.running.title_plural": "{{count}} 項任務正在執行",+ "inbox.unread.followUp": "後續跟進",+ "inbox.unread.followUpPlaceholder": "回覆以繼續此流程…",+ "inbox.unread.title": "未讀",+ "inbox.unread.viewChat": "查看聊天","project.create": "新增專案","project.deleteConfirm": "此專案將被刪除且無法恢復。確認繼續。","recommendations.heteroAgent.cta": "新增代理",diff --git a/locales/zh-TW/plugin.json b/locales/zh-TW/plugin.jsonindex cb5cae0fa64..44da70fd268 100644--- a/locales/zh-TW/plugin.json+++ b/locales/zh-TW/plugin.json@@ -128,9 +128,7 @@"builtins.lobe-claude-code.agent.instruction": "指令","builtins.lobe-claude-code.agent.result": "結果","builtins.lobe-claude-code.askUserQuestion.noAnswer": "未收到回答 — 模型在未獲得輸入的情況下繼續。",- "builtins.lobe-claude-code.askUserQuestion.question": "問題",- "builtins.lobe-claude-code.askUserQuestion.reply": "回覆",- "builtins.lobe-claude-code.askUserQuestion.selected": "已選擇",+ "builtins.lobe-claude-code.askUserQuestion.notAnswered": "未回答","builtins.lobe-claude-code.sendMessage.queued": "已排隊等待傳送","builtins.lobe-claude-code.sendMessage.title": "傳送訊息","builtins.lobe-claude-code.task.create.completed": "任務已建立:",diff --git a/packages/database/src/models/__tests__/topic.test.ts b/packages/database/src/models/__tests__/topic.test.tsindex 3ea57a6136e..c66626af369 100644--- a/packages/database/src/models/__tests__/topic.test.ts+++ b/packages/database/src/models/__tests__/topic.test.ts@@ -323,6 +323,92 @@ describe('TopicModel', () => {const result = await topicModel.queryTopics();expect(result.map((t) => t.id).sort()).toEqual(['t1', 't2']);});++ it('omits the last assistant message unless asked for it', async () => {+ await serverDB.insert(topics).values({ id: 't-lm', status: 'unread', title: 'lm', userId });+ await serverDB.insert(messages).values({+ content: 'the answer',+ id: 'lm-1',+ role: 'assistant',+ topicId: 't-lm',+ userId,+ });++ const [topic] = await topicModel.queryTopics({ statuses: ['unread'] });+ expect(topic).not.toHaveProperty('lastAssistantMessage');+ });++ it('pulls the latest non-empty assistant message per topic with withLastMessage', async () => {+ await serverDB.insert(topics).values([+ { id: 't-a', status: 'unread', title: 'a', userId },+ { id: 't-b', status: 'unread', title: 'b', userId },+ ]);+ await serverDB.insert(messages).values([+ // Newest assistant turn of t-a carried only tool calls (empty content) —+ // the preview must fall back to the last thing it actually said.+ {+ content: '',+ createdAt: new Date('2026-01-04'),+ id: 'a-3',+ role: 'assistant',+ topicId: 't-a',+ userId,+ },+ {+ content: 'a: final answer',+ createdAt: new Date('2026-01-03'),+ id: 'a-2',+ role: 'assistant',+ topicId: 't-a',+ userId,+ },+ {+ content: 'a: earlier answer',+ createdAt: new Date('2026-01-02'),+ id: 'a-1',+ role: 'assistant',+ topicId: 't-a',+ userId,+ },+ // A user message is never a candidate, even when it is the latest turn.+ {+ content: 'a: user follow-up',+ createdAt: new Date('2026-01-05'),+ id: 'a-user',+ role: 'user',+ topicId: 't-a',+ userId,+ },+ ]);++ const result = await topicModel.queryTopics({+ statuses: ['unread'],+ withLastMessage: true,+ });+ const byId = Object.fromEntries(result.map((t) => [t.id, t]));++ expect(byId['t-a'].lastAssistantMessage).toBe('a: final answer');+ // A topic with no assistant reply yet still comes back — just without one.+ expect(byId['t-b'].lastAssistantMessage).toBeNull();+ });++ it('marks an over-long reply as truncated instead of cutting it silently', async () => {+ await serverDB.insert(topics).values({ id: 't-long', status: 'unread', title: 'l', userId });+ await serverDB.insert(messages).values({+ content: 'x'.repeat(2500),+ id: 'long-1',+ role: 'assistant',+ topicId: 't-long',+ userId,+ });++ const [topic] = await topicModel.queryTopics({+ statuses: ['unread'],+ withLastMessage: true,+ });++ expect(topic.lastAssistantMessage).toBe(`${'x'.repeat(2000)}…`);+ });});describe('count', () => {diff --git a/packages/database/src/models/brief.ts b/packages/database/src/models/brief.tsindex f5eded3f426..318b3d43427 100644--- a/packages/database/src/models/brief.ts+++ b/packages/database/src/models/brief.ts@@ -13,6 +13,9 @@ export interface UnresolvedBriefRow {agentRowId: string | null;agentTitle: string | null;brief: BriefItem;+ /** Workspace-scoped task ref (`T-12`), so an inbox row can name the task it belongs to. */+ taskIdentifier: string | null;+ taskName: string | null;taskStatus: string | null;}@@ -103,6 +106,8 @@ export class BriefModel {agentSlug: agents.slug,agentTitle: agents.title,brief: briefs,+ taskIdentifier: tasks.identifier,+ taskName: tasks.name,taskStatus: tasks.status,}).from(briefs)diff --git a/packages/database/src/models/topic.ts b/packages/database/src/models/topic.tsindex da7423813a4..5da2c39424d 100644--- a/packages/database/src/models/topic.ts+++ b/packages/database/src/models/topic.ts@@ -19,6 +19,7 @@ import {count,desc,eq,+ getTableColumns,gt,gte,inArray,@@ -44,6 +45,19 @@ type TopicMetadataPatch = Omit<Partial<ChatTopicMetadata>, 'onboardingSession'>onboardingSession?: OnboardingSessionMetadataPatch;};+/**+ * How much of the last assistant reply `queryTopics` ships to a list view. Long+ * enough that a run summary arrives whole, short enough that 200 rows of raw+ * markdown never do — anything past it is marked with an ellipsis, and the full+ * text is one click away in the topic itself.+ */+const LAST_MESSAGE_PREVIEW_LENGTH = 2000;++export interface TopicListItem extends TopicItem {+ /** The topic's last non-empty assistant reply, truncated with a trailing `…`. Only set when `queryTopics` is called with `withLastMessage`. */+ lastAssistantMessage?: string | null;+}+export interface CreateTopicParams {agentId?: string | null;favorite?: boolean;@@ -567,24 +581,80 @@ export class TopicModel {* Query the current user's topics, optionally filtered by status. Used by the* Fleet view to list actively-running topics across all agents without* pulling the full topic set to the client.+ *+ * `withLastMessage` additionally pulls each topic's last assistant reply, so a+ * list can show what the agent actually said instead of just a title. The+ * preview is truncated server-side — raw assistant output is unbounded+ * markdown, and a list only ever renders the head of it.*/queryTopics = async ({statuses,pageSize = 200,- }: { pageSize?: number; statuses?: string[] } = {}): Promise<TopicItem[]> => {- return this.db- .select()- .from(topics)+ withLastMessage,+ }: {+ pageSize?: number;+ statuses?: string[];+ withLastMessage?: boolean;+ } = {}): Promise<TopicListItem[]> => {+ const where = and(+ this.ownership(),+ statuses && statuses.length > 0+ ? inArray(topics.status, statuses as ChatTopicStatus[])+ : undefined,+ );++ if (!withLastMessage) {+ return this.db+ .select()+ .from(topics)+ .where(where)+ .orderBy(desc(topics.updatedAt))+ .limit(pageSize);+ }++ // Built with the query builder rather than a raw `sql` template so the inner+ // `eq(messages.topicId, topics.id)` renders both sides fully qualified —+ // see the note on `firstUserMessageSubquery` in `query()`.+ //+ // Assistant turns that only carried tool calls persist an empty `content`;+ // skipping them lands on the last thing the agent actually *said*.+ // One char past the limit, so the caller can tell "exactly this long" from+ // "cut short" and mark the cut instead of ending mid-sentence.+ const lastAssistantMessageSubquery = this.db+ .select({+ value: sql<string>`left(${messages.content}, ${LAST_MESSAGE_PREVIEW_LENGTH + 1})`,+ })+ .from(messages).where(and(- this.ownership(),- statuses && statuses.length > 0- ? inArray(topics.status, statuses as ChatTopicStatus[])- : undefined,+ eq(messages.topicId, topics.id),+ eq(messages.role, 'assistant'),+ this.messageOwnership(),+ ne(messages.content, ''),),)+ .orderBy(desc(messages.createdAt))+ .limit(1);++ const rows = await this.db+ .select({+ ...getTableColumns(topics),+ lastAssistantMessage: sql<string | null>`(${lastAssistantMessageSubquery})`.as(+ 'last_assistant_message',+ ),+ })+ .from(topics)+ .where(where).orderBy(desc(topics.updatedAt)).limit(pageSize);++ return rows.map((row) => ({+ ...row,+ lastAssistantMessage:+ row.lastAssistantMessage && row.lastAssistantMessage.length > LAST_MESSAGE_PREVIEW_LENGTH+ ? `${row.lastAssistantMessage.slice(0, LAST_MESSAGE_PREVIEW_LENGTH)}…`+ : row.lastAssistantMessage,+ }));};queryByKeyword = async (diff --git a/packages/locales/src/default/home.ts b/packages/locales/src/default/home.tsindex fcaa7ca3874..f7ecdbbbf6c 100644--- a/packages/locales/src/default/home.ts+++ b/packages/locales/src/default/home.ts@@ -46,6 +46,15 @@ export default {'homePromoBanner.cta': 'Try now','homePromoBanner.dismiss': 'Dismiss','homePromoBanner.label': '{{model}} is now available',+ 'inbox.needsYou.title': 'Needs you',+ 'inbox.news.subtitle': 'Nothing to decide — just a glance',+ 'inbox.news.title': 'Daily brief',+ 'inbox.running.title': '{{count}} task running',+ 'inbox.running.title_plural': '{{count}} tasks running',+ 'inbox.unread.followUp': 'Follow up',+ 'inbox.unread.followUpPlaceholder': 'Reply to continue this run…',+ 'inbox.unread.title': 'Unread',+ 'inbox.unread.viewChat': 'View chat','project.create': 'New project','project.deleteConfirm':"This project will be deleted and can't be recovered. Confirm to continue.",diff --git a/src/components/CollapsibleContent/index.tsx b/src/components/CollapsibleContent/index.tsxnew file mode 100644index 00000000000..0570dd6d9c8--- /dev/null+++ b/src/components/CollapsibleContent/index.tsx@@ -0,0 +1,176 @@+'use client';++import { createStaticStyles } from 'antd-style';+import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';+import type { CSSProperties, MouseEvent, ReactNode } from 'react';+import { memo, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';++const DEFAULT_MAX_HEIGHT = 280;+const DEFAULT_FADE_HEIGHT = 48;+// The fade must stay under one line-height, or the last visible line is a ghost+// and a short preview has nothing legible left in it.+const FADE_RATIO = 0.2;+const VIEWPORT_RATIO = 0.35;+// Only collapse when the overflow is meaningful; avoids hiding a button for a+// handful of extra pixels.+const OVERFLOW_THRESHOLD = 32;++const styles = createStaticStyles(({ css, cssVar }) => ({+ container: css`+ position: relative;+ width: 100%;+ `,+ contentCollapsed: css`+ overflow: hidden;++ /* Fade height scales with the clamp — a fixed 48px would swallow most of a+ three-line preview and leave the last line unreadable. */+ mask-image: linear-gradient(to bottom, #000 calc(100% - var(--collapse-fade)), transparent);+ `,+ contentExpanded: css`+ overflow: visible;+ `,+ toggleButton: css`+ cursor: pointer;++ display: inline-flex;+ gap: 4px;+ align-items: center;++ block-size: 24px;+ padding-inline: 10px;+ border: none;+ border-radius: 12px;++ font-size: 12px;+ color: ${cssVar.colorTextSecondary};++ background: ${cssVar.colorFillQuaternary};++ transition:+ color 150ms ${cssVar.motionEaseOut},+ background 150ms ${cssVar.motionEaseOut};++ &:hover {+ color: ${cssVar.colorText};+ background: ${cssVar.colorFillTertiary};+ }+ `,+ toggleWrapper: css`+ display: flex;+ justify-content: center;+ margin-block-start: 6px;+ `,+}));++const computeThreshold = (limit: number) => {+ if (typeof window === 'undefined') return limit;+ return Math.min(limit, Math.round(window.innerHeight * VIEWPORT_RATIO));+};++interface CollapsibleContentProps {+ children: ReactNode;+ /** Upper bound for the collapsed height; the effective clamp also honours the viewport. */+ maxHeight?: number;+ /** How far content must overflow before collapsing is worth a toggle. Lower it for short previews, where a couple of hidden lines already matter. */+ overflowThreshold?: number;+}++/**+ * Collapses long content to a bounded max-height with a gradient mask and a+ * toggle button. Born in the user message bubble — where a long prompt would+ * otherwise push the AI response out of the viewport — and now the one collapse+ * behaviour shared by every long-content preview (task runs, inbox rows), so+ * "show more" looks and measures the same everywhere.+ *+ * The clamp is capped by the viewport, not just `maxHeight`: on a short window a+ * 280px preview is most of the screen.+ */+const CollapsibleContent = memo<CollapsibleContentProps>(+ ({+ children,+ maxHeight: maxHeightLimit = DEFAULT_MAX_HEIGHT,+ overflowThreshold = OVERFLOW_THRESHOLD,+ }) => {+ const { t } = useTranslation('chat');+ const contentRef = useRef<HTMLDivElement | null>(null);++ const [maxHeight, setMaxHeight] = useState(() => computeThreshold(maxHeightLimit));+ const [naturalHeight, setNaturalHeight] = useState(0);+ const [collapsed, setCollapsed] = useState(true);++ // Measure content's natural (unconstrained) height. We read scrollHeight so+ // the value is unaffected by our own max-height clamp.+ useLayoutEffect(() => {+ const el = contentRef.current;+ if (!el) return;++ const measure = () => {+ setNaturalHeight(el.scrollHeight);+ };+ measure();++ if (typeof ResizeObserver === 'undefined') return;+ const observer = new ResizeObserver(measure);+ observer.observe(el);+ return () => observer.disconnect();+ }, []);++ useEffect(() => {+ if (typeof window === 'undefined') return;++ const handleResize = () => setMaxHeight(computeThreshold(maxHeightLimit));+ handleResize();++ window.addEventListener('resize', handleResize);+ return () => window.removeEventListener('resize', handleResize);+ }, [maxHeightLimit]);++ const shouldCollapse = naturalHeight > maxHeight + overflowThreshold;+ const isCollapsed = shouldCollapse && collapsed;++ // Previews live inside clickable cards (a task run opens its drawer) — the+ // toggle must not also trigger the card.+ const handleToggle = useCallback((e: MouseEvent) => {+ e.stopPropagation();+ setCollapsed((prev) => !prev);+ }, []);++ return (+ <div className={styles.container}>+ <div+ className={isCollapsed ? styles.contentCollapsed : styles.contentExpanded}+ ref={contentRef}+ style={+ isCollapsed+ ? ({+ '--collapse-fade': `${Math.round(Math.min(DEFAULT_FADE_HEIGHT, maxHeight * FADE_RATIO))}px`,+ maxHeight,+ } as CSSProperties)+ : undefined+ }+ >+ {children}+ </div>+ {shouldCollapse && (+ <div className={styles.toggleWrapper}>+ <button+ aria-expanded={!collapsed}+ className={styles.toggleButton}+ type="button"+ onClick={handleToggle}+ >+ {collapsed ? <ChevronDownIcon size={14} /> : <ChevronUpIcon size={14} />}+ {collapsed ? t('messageLongCollapse.expand') : t('messageLongCollapse.collapse')}+ </button>+ </div>+ )}+ </div>+ );+ },+);++CollapsibleContent.displayName = 'CollapsibleContent';++export default CollapsibleContent;diff --git a/src/components/UnreadDot/index.tsx b/src/components/UnreadDot/index.tsxnew file mode 100644index 00000000000..b71fd020493--- /dev/null+++ b/src/components/UnreadDot/index.tsx@@ -0,0 +1,76 @@+import { createStaticStyles, keyframes } from 'antd-style';+import { memo } from 'react';++const rippleAnim = keyframes`+ 0% {+ transform: scale(1);+ opacity: 0.7;+ }+ 100% {+ transform: scale(3);+ opacity: 0;+ }+`;++const styles = createStaticStyles(({ css, cssVar }) => ({+ dot: css`+ position: relative;+ z-index: 1;++ width: 6px;+ height: 6px;+ border-radius: 50%;++ background: ${cssVar.colorInfo};+ `,+ ripple: css`+ position: absolute;+ inset: 0;++ width: 6px;+ height: 6px;+ margin: auto;+ border: 1px solid ${cssVar.colorInfo};+ border-radius: 50%;++ background: transparent;++ animation: ${rippleAnim} 1.8s ease-out infinite;+ `,+ wrapper: css`+ position: relative;++ display: flex;+ flex: none;+ align-items: center;+ justify-content: center;++ width: 14px;+ height: 14px;+ `,+}));++interface UnreadDotProps {+ /** Announces the mark to screen readers — pass it wherever the dot is the only carrier of "unread". */+ label?: string;+}++/**+ * The unread mark for a completed run the user hasn't opened: a live rippling+ * dot rather than a static glyph, so "there's something new here" reads at a+ * glance in a long list. `ExecutionStatus`'s `unread` icon is only the fallback+ * for surfaces that can't render this.+ */+const UnreadDot = memo<UnreadDotProps>(({ label }) => (+ <span+ aria-label={label}+ className={styles.wrapper}+ data-testid="topic-unread-dot"+ role={label ? 'status' : undefined}+ >+ <span className={styles.ripple} />+ <span className={styles.dot} />+ </span>+));++export default UnreadDot;diff --git a/src/features/AgentTasks/AgentTaskDetail/TopicCard.tsx b/src/features/AgentTasks/AgentTaskDetail/TopicCard.tsxindex e22d482ab30..2135d7c1746 100644--- a/src/features/AgentTasks/AgentTaskDetail/TopicCard.tsx+++ b/src/features/AgentTasks/AgentTaskDetail/TopicCard.tsx@@ -7,27 +7,17 @@ import {DropdownMenu,Flexbox,Markdown,- MaskShadow,stopPropagation,Tag,Text,} from '@lobehub/ui';-import { Button, confirmModal } from '@lobehub/ui/base-ui';-import { useSize } from 'ahooks';-import { createStaticStyles, cssVar } from 'antd-style';-import {- ChevronDownIcon,- ChevronUpIcon,- CircleDot,- CircleStop,- Copy,- ExternalLink,- MoreHorizontal,- SquarePen,-} from 'lucide-react';-import { memo, useCallback, useEffect, useRef, useState } from 'react';+import { confirmModal } from '@lobehub/ui/base-ui';+import { cssVar } from 'antd-style';+import { CircleDot, CircleStop, Copy, ExternalLink, MoreHorizontal, SquarePen } from 'lucide-react';+import { memo, useCallback, useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';+import CollapsibleContent from '@/components/CollapsibleContent';import AgentProfilePopup from '@/features/AgentProfileCard/AgentProfilePopup';import { useActivityTime } from '@/hooks/useActivityTime';import { usePermission } from '@/hooks/usePermission';@@ -38,50 +28,6 @@ import { styles } from '../shared/style';import RunReplyEditor from './RunReplyEditor';import TopicStatusIcon from './TopicStatusIcon';-const runContentStyles = createStaticStyles(({ css, cssVar }) => ({- clipInner: css`- padding-block-end: 36px;- `,- container: css`- position: relative;- width: 100%;- `,- toggleButton: css`- pointer-events: auto;-- height: 28px;- padding-inline: 10px;- border-color: transparent;- border-radius: 999px;-- color: ${cssVar.colorTextSecondary};-- background: ${cssVar.colorFillQuaternary};-- &:focus-visible,- &:hover:not(:disabled, [aria-disabled='true']) {- color: ${cssVar.colorText};- background: ${cssVar.colorFillTertiary};- }- `,- toggleFloating: css`- pointer-events: none;-- position: absolute;- z-index: 1;- inset-block-end: 4px;- inset-inline: 0;-- display: flex;- justify-content: center;- `,- toggleInline: css`- display: flex;- justify-content: center;- margin-block-start: 4px;- `,-}));-const formatDuration = (ms: number): string => {const seconds = Math.floor(ms / 1000);if (seconds < 60) return `${seconds}s`;@@ -93,66 +39,18 @@ const formatDuration = (ms: number): string => {// The run's last message (`content`) is the raw assistant output — markdown, and// often long. Render it as rich text, but keep it a bounded preview in the feed:-// clamp overflow with a fade, offer an inline expand affordance, and still let-// the whole card open the run drawer for deeper reading. `pointerEvents: none`+// the shared collapse clamps it with a fade and offers "show more", while the+// whole card still opens the run drawer for deeper reading. `pointerEvents: none`// keeps every click inside markdown falling through to the card.const RUN_CONTENT_MAX_HEIGHT = 160;-const RunContent = memo<{ content: string }>(({ content }) => {- const { t } = useTranslation('chat');- const ref = useRef<HTMLDivElement>(null);- const size = useSize(ref);- const [expanded, setExpanded] = useState(false);- const isOverflow = !!size && size.height > RUN_CONTENT_MAX_HEIGHT;-- useEffect(() => {- setExpanded(false);- }, [content]);-- const markdown = (- <Markdown ref={ref} style={{ overflow: 'unset', pointerEvents: 'none' }} variant={'chat'}>+const RunContent = memo<{ content: string }>(({ content }) => (+ <CollapsibleContent key={content} maxHeight={RUN_CONTENT_MAX_HEIGHT}>+ <Markdown style={{ overflow: 'unset', pointerEvents: 'none' }} variant={'chat'}>{content}</Markdown>- );-- if (!isOverflow) return markdown;-- const toggleButton = (- <Button- aria-expanded={expanded}- className={runContentStyles.toggleButton}- icon={expanded ? <ChevronUpIcon size={14} /> : <ChevronDownIcon size={14} />}- shape={'round'}- size={'small'}- type={'fill'}- onClick={() => setExpanded((value) => !value)}- >- {expanded ? t('messageLongCollapse.collapse') : t('messageLongCollapse.expand')}- </Button>- );-- if (expanded) {- return (- <div className={runContentStyles.container}>- {markdown}- <div className={runContentStyles.toggleInline} onClick={stopPropagation}>- {toggleButton}- </div>- </div>- );- }-- return (- <div className={runContentStyles.container}>- <MaskShadow size={40} style={{ maxHeight: RUN_CONTENT_MAX_HEIGHT }}>- <div className={runContentStyles.clipInner}>{markdown}</div>- </MaskShadow>- <div className={runContentStyles.toggleFloating} onClick={stopPropagation}>- {toggleButton}- </div>- </div>- );-});+ </CollapsibleContent>+));interface TopicCardProps {activity: TaskDetailActivity;diff --git a/src/features/AgentTasks/AgentTaskDetail/TopicChatDrawer/index.tsx b/src/features/AgentTasks/AgentTaskDetail/TopicChatDrawer/index.tsxindex 1ba70dcb6a8..b6319c2ddba 100644--- a/src/features/AgentTasks/AgentTaskDetail/TopicChatDrawer/index.tsx+++ b/src/features/AgentTasks/AgentTaskDetail/TopicChatDrawer/index.tsx@@ -2,15 +2,7 @@import type { ConversationContext } from '@lobechat/types';import type { DropdownItem } from '@lobehub/ui';-import {- ActionIcon,- copyToClipboard,- DropdownMenu,- Flexbox,- Freeze,- Tag,- Text,-} from '@lobehub/ui';+import { ActionIcon, copyToClipboard, DropdownMenu, Flexbox, Freeze, Tag, Text } from '@lobehub/ui';import { FloatingPanel } from '@lobehub/ui/base-ui';import { Copy, MoreHorizontal, Share2 } from 'lucide-react';import { memo, useCallback, useMemo } from 'react';@@ -112,7 +104,8 @@ const TopicChatDrawer = memo(() => {const { t } = useTranslation(['chat', 'common']);const topicId = useTaskStore(taskDetailSelectors.activeTopicDrawerTopicId);const activeTaskId = useTaskStore((s) => s.activeTaskId);- const agentId = useTaskStore(taskDetailSelectors.activeTaskAgentId);+ const agentId = useTaskStore(taskDetailSelectors.topicDrawerAgentId);+ const drawerTitle = useTaskStore(taskDetailSelectors.topicDrawerTitle);const activity = useTaskStore(taskActivitySelectors.activeDrawerTopicActivity);const closeTopicDrawer = useTaskStore((s) => s.closeTopicDrawer);const useFetchTaskDetail = useTaskStore((s) => s.useFetchTaskDetail);@@ -181,7 +174,7 @@ const TopicChatDrawer = memo(() => {</Tag>)}<Text ellipsis style={{ flex: '0 1 auto', minWidth: 0 }} weight={500}>- {activity?.title || t('taskDetail.topicDrawer.untitled')}+ {activity?.title || drawerTitle || t('taskDetail.topicDrawer.untitled')}</Text>{activity?.seq != null && (<Text fontSize={12} style={{ flex: 'none' }} type={'secondary'}>@@ -204,14 +197,13 @@ const TopicChatDrawer = memo(() => {/>);- const actions =- !topicId ? null : enableTopicLinkShare && canShare ? (- <SharePopover topicId={topicId} onOpenModal={openShareModal}>- {shareIcon}- </SharePopover>- ) : (- shareIcon- );+ const actions = !topicId ? null : enableTopicLinkShare && canShare ? (+ <SharePopover topicId={topicId} onOpenModal={openShareModal}>+ {shareIcon}+ </SharePopover>+ ) : (+ shareIcon+ );// Freeze title/actions/body during the close animation so the panel keeps// its last rendered state instead of flashing to the empty/"untitled" view@@ -240,8 +232,11 @@ const TopicChatDrawer = memo(() => {}}onClose={closeTopicDrawer}>+ {/* `open` already proves both ids. The body deliberately does NOT wait for a+ task: a run opened from the home inbox may have no parent task at all,+ and gating on one renders a titled but empty panel. */}<Freeze frozen={!open}>- {open && activeTaskId && <TopicChatDrawerBody agentId={agentId!} topicId={topicId!} />}+ {open && <TopicChatDrawerBody agentId={agentId!} topicId={topicId!} />}</Freeze></FloatingPanel>);diff --git a/src/features/Conversation/Messages/User/components/CollapsibleContent.tsx b/src/features/Conversation/Messages/User/components/CollapsibleContent.tsxdeleted file mode 100644index a533a4e93b8..00000000000--- a/src/features/Conversation/Messages/User/components/CollapsibleContent.tsx+++ /dev/null@@ -1,146 +0,0 @@-'use client';--import { createStaticStyles } from 'antd-style';-import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';-import {- memo,- type ReactNode,- useCallback,- useEffect,- useLayoutEffect,- useRef,- useState,-} from 'react';-import { useTranslation } from 'react-i18next';--const DEFAULT_MAX_HEIGHT = 280;-const VIEWPORT_RATIO = 0.35;-// Only collapse when the overflow is meaningful; avoids hiding a button for a-// handful of extra pixels.-const OVERFLOW_THRESHOLD = 32;--const styles = createStaticStyles(({ css, cssVar }) => ({- container: css`- position: relative;- width: 100%;- `,- contentCollapsed: css`- overflow: hidden;-- mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent);- `,- contentExpanded: css`- overflow: visible;- `,- toggleButton: css`- cursor: pointer;-- display: inline-flex;- gap: 4px;- align-items: center;-- block-size: 24px;- padding-inline: 10px;- border: none;- border-radius: 12px;-- font-size: 12px;- color: ${cssVar.colorTextSecondary};-- background: ${cssVar.colorFillQuaternary};-- transition:- color 150ms ${cssVar.motionEaseOut},- background 150ms ${cssVar.motionEaseOut};-- &:hover {- color: ${cssVar.colorText};- background: ${cssVar.colorFillTertiary};- }- `,- toggleWrapper: css`- display: flex;- justify-content: center;- margin-block-start: 6px;- `,-}));--const computeThreshold = () => {- if (typeof window === 'undefined') return DEFAULT_MAX_HEIGHT;- return Math.min(DEFAULT_MAX_HEIGHT, Math.round(window.innerHeight * VIEWPORT_RATIO));-};--interface CollapsibleContentProps {- children: ReactNode;-}--/**- * Collapses long user message content to a bounded max-height with a gradient- * mask and a toggle button. Prevents very long user messages from pushing the- * AI response out of the viewport after auto-scroll pins the user message- * to the top.- */-const CollapsibleContent = memo<CollapsibleContentProps>(({ children }) => {- const { t } = useTranslation('chat');- const contentRef = useRef<HTMLDivElement | null>(null);-- const [maxHeight, setMaxHeight] = useState(() => computeThreshold());- const [naturalHeight, setNaturalHeight] = useState(0);- const [collapsed, setCollapsed] = useState(true);-- // Measure content's natural (unconstrained) height. We read scrollHeight so- // the value is unaffected by our own max-height clamp.- useLayoutEffect(() => {- const el = contentRef.current;- if (!el) return;-- const measure = () => {- setNaturalHeight(el.scrollHeight);- };- measure();-- if (typeof ResizeObserver === 'undefined') return;- const observer = new ResizeObserver(measure);- observer.observe(el);- return () => observer.disconnect();- }, []);-- useEffect(() => {- if (typeof window === 'undefined') return;-- const handleResize = () => setMaxHeight(computeThreshold());- window.addEventListener('resize', handleResize);- return () => window.removeEventListener('resize', handleResize);- }, []);-- const shouldCollapse = naturalHeight > maxHeight + OVERFLOW_THRESHOLD;- const isCollapsed = shouldCollapse && collapsed;-- const handleToggle = useCallback(() => {- setCollapsed((prev) => !prev);- }, []);-- return (- <div className={styles.container}>- <div- className={isCollapsed ? styles.contentCollapsed : styles.contentExpanded}- ref={contentRef}- style={isCollapsed ? { maxHeight } : undefined}- >- {children}- </div>- {shouldCollapse && (- <div className={styles.toggleWrapper}>- <button className={styles.toggleButton} type="button" onClick={handleToggle}>- {collapsed ? <ChevronDownIcon size={14} /> : <ChevronUpIcon size={14} />}- {collapsed ? t('messageLongCollapse.expand') : t('messageLongCollapse.collapse')}- </button>- </div>- )}- </div>- );-});--CollapsibleContent.displayName = 'CollapsibleContent';--export default CollapsibleContent;diff --git a/src/features/Conversation/Messages/User/components/MessageContent.tsx b/src/features/Conversation/Messages/User/components/MessageContent.tsxindex d710c237cc7..ccb40711937 100644--- a/src/features/Conversation/Messages/User/components/MessageContent.tsx+++ b/src/features/Conversation/Messages/User/components/MessageContent.tsx@@ -1,13 +1,13 @@import { Flexbox } from '@lobehub/ui';import { memo, useMemo } from 'react';+import CollapsibleContent from '@/components/CollapsibleContent';import MarkdownMessage from '@/features/Conversation/Markdown';import { cleanSpeakerTag } from '@/store/chat/utils/cleanSpeakerTag';import { type UIChatMessage } from '@/types/index';import { useMarkdown } from '../useMarkdown';import AudioFileListViewer from './AudioFileListViewer';-import CollapsibleContent from './CollapsibleContent';import FileListViewer from './FileListViewer';import ImageFileListViewer from './ImageFileListViewer';import PageSelections from './PageSelections';diff --git a/src/features/DailyBrief/BriefCard.tsx b/src/features/DailyBrief/BriefCard.tsxdeleted file mode 100644index 3208a6a6252..00000000000--- a/src/features/DailyBrief/BriefCard.tsx+++ /dev/null@@ -1,130 +0,0 @@-import { DEFAULT_AVATAR, INBOX_SESSION_ID } from '@lobechat/const';-import { ActionIcon, Avatar, Block, Flexbox, Icon, Text } from '@lobehub/ui';-import { Divider } from 'antd';-import { cssVar } from 'antd-style';-import { Check, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';-import { memo, useState } from 'react';-import { useTranslation } from 'react-i18next';--import { DEFAULT_INBOX_AVATAR } from '@/const/meta';-import { taskDetailPath } from '@/features/AgentTasks/shared/taskDetailPath';-import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';-import Time from '@/routes/(main)/home/features/components/Time';--import BriefCardActions from './BriefCardActions';-import BriefCardArtifacts from './BriefCardArtifacts';-import BriefCardSummary from './BriefCardSummary';-import BriefIcon from './BriefIcon';-import { styles } from './style';-import { type AgentAvatarInfo, type BriefItem } from './types';--interface ProducingAgentAvatarProps {- agent: AgentAvatarInfo;-}--const ProducingAgentAvatar = memo<ProducingAgentAvatarProps>(({ agent }) => {- const { t } = useTranslation('common');- const isInbox = agent.id === INBOX_SESSION_ID;- return (- <Avatar- avatar={agent.avatar || (isInbox ? DEFAULT_INBOX_AVATAR : DEFAULT_AVATAR)}- background={agent.backgroundColor || cssVar.colorBgContainer}- shape={'circle'}- size={28}- title={agent.title || (isInbox ? t('inbox.title', { ns: 'chat' }) : t('defaultSession'))}- />- );-});--interface BriefCardProps {- brief: BriefItem;- /** When false, disables the header click-to-navigate behavior. */- enableNavigation?: boolean;- /** Hook invoked after a feedback comment is posted. */- onAfterAddComment?: () => void | Promise<void>;- /** Hook invoked after the brief is resolved. */- onAfterResolve?: () => void | Promise<void>;-}--const BriefCard = memo<BriefCardProps>(- ({ brief, enableNavigation = true, onAfterResolve, onAfterAddComment }) => {- const navigate = useWorkspaceAwareNavigate();- const { t } = useTranslation('home');- const isResolved = Boolean(brief.resolvedAction);- const [expanded, setExpanded] = useState(false);- const showFull = !isResolved || expanded;-- const canNavigate = enableNavigation && Boolean(brief.taskId);- const handleNavigate = () => {- if (!brief.taskId) return;- navigate(taskDetailPath(brief.taskId, brief.agentId ?? undefined));- };-- return (- <Block- className={styles.card}- gap={12}- padding={12}- style={{ borderRadius: cssVar.borderRadiusLG }}- variant={'outlined'}- >- <Flexbox- horizontal- align={'center'}- className={canNavigate ? styles.clickableHeader : undefined}- gap={16}- justify={'space-between'}- onClick={canNavigate ? handleNavigate : undefined}- >- <Flexbox horizontal align={'center'} flex={1} gap={8} style={{ overflow: 'hidden' }}>- <BriefIcon muted={isResolved} type={brief.type} />- <Text ellipsis fontSize={16} weight={500}>- {brief.title}- </Text>- <Time date={brief.createdAt} />- </Flexbox>- <Flexbox horizontal align={'center'} gap={8}>- {isResolved && !expanded && (- <Flexbox horizontal align={'center'} gap={4}>- <Icon color={cssVar.colorTextQuaternary} icon={Check} size={14} />- <Text className={styles.resolvedTag}>{t('brief.resolved')}</Text>- </Flexbox>- )}- {brief.agent && <ProducingAgentAvatar agent={brief.agent} />}- {isResolved && (- <ActionIcon- icon={expanded ? ChevronUpIcon : ChevronDownIcon}- size={'small'}- title={expanded ? t('brief.collapse') : t('brief.expandAll')}- onClick={(event) => {- event.stopPropagation();- setExpanded((v) => !v);- }}- />- )}- </Flexbox>- </Flexbox>- {showFull && (- <>- <Divider dashed style={{ marginBlock: 0 }} />- <BriefCardSummary summary={brief.summary} />- <BriefCardArtifacts artifacts={brief.artifacts} />- <BriefCardActions- actions={brief.actions}- briefId={brief.id}- briefType={brief.type}- resolvedAction={brief.resolvedAction}- taskId={brief.taskId}- taskStatus={brief.taskStatus}- topicId={brief.topicId}- onAfterAddComment={onAfterAddComment}- onAfterResolve={onAfterResolve}- />- </>- )}- </Block>- );- },-);--export default BriefCard;diff --git a/src/features/DailyBrief/__tests__/index.test.tsx b/src/features/DailyBrief/__tests__/index.test.tsxdeleted file mode 100644index 5604c779524..00000000000--- a/src/features/DailyBrief/__tests__/index.test.tsx+++ /dev/null@@ -1,168 +0,0 @@-import { render, screen } from '@testing-library/react';-import type { ReactNode } from 'react';-import { beforeEach, describe, expect, it, vi } from 'vitest';--import DailyBrief from '..';--interface MockBrief {- id: string;- title: string;-}--const mocks = vi.hoisted(() => ({- state: {- briefs: [] as MockBrief[],- isBriefsInit: true,- isLogin: true,- recommendationsVisible: true,- },- useFetchBriefs: vi.fn(),-}));--vi.mock('@lobehub/ui', () => ({- Button: ({ children, onClick }: { children: ReactNode; onClick?: () => void }) => (- <button onClick={onClick}>{children}</button>- ),- Flexbox: ({ children }: { children: ReactNode }) => <div>{children}</div>,-}));--vi.mock('react-i18next', () => ({- useTranslation: () => ({- t: (key: string) => {- const map: Record<string, string> = {- 'brief.title': 'Brief',- 'brief.viewAllTasks': 'View all tasks',- };- return map[key] || key;- },- }),-}));--vi.mock('react-router', () => ({- useNavigate: () => vi.fn(),-}));--vi.mock('@/features/AgentTasks/AgentTaskDetail/TopicChatDrawer', () => ({- default: () => <div data-testid="topic-chat-drawer" />,-}));--vi.mock('@/features/DocumentModal/Preview', () => ({- default: () => <div data-testid="document-preview-modal" />,-}));--vi.mock('@/features/Recommendations', () => ({- default: () => <div>Recommendations</div>,- useRecommendationsVisible: () => mocks.state.recommendationsVisible,-}));--vi.mock('@/components/AsyncError', () => ({- default: () => <div data-testid="async-error" />,-}));--vi.mock('@/routes/(main)/home/features/components/GroupBlock', () => ({- default: ({- action,- children,- title,- }: {- action?: ReactNode;- children: ReactNode;- title?: ReactNode;- }) => (- <section data-testid="group-block">- <header>- {title}- {action}- </header>- {children}- </section>- ),-}));--vi.mock('@/store/brief', () => ({- useBriefStore: (- selector: (state: {- briefs: MockBrief[];- isBriefsInit: boolean;- useFetchBriefs: typeof mocks.useFetchBriefs;- }) => unknown,- ) =>- selector({- briefs: mocks.state.briefs,- isBriefsInit: mocks.state.isBriefsInit,- useFetchBriefs: mocks.useFetchBriefs,- }),-}));--vi.mock('@/store/brief/selectors', () => ({- briefListSelectors: {- briefs: (state: { briefs: MockBrief[] }) => state.briefs,- isBriefsInit: (state: { isBriefsInit: boolean }) => state.isBriefsInit,- },-}));--vi.mock('@/store/user', () => ({- useUserStore: (selector: (state: { isLogin: boolean }) => unknown) =>- selector({ isLogin: mocks.state.isLogin }),-}));--vi.mock('@/store/user/slices/auth/selectors', () => ({- authSelectors: {- isLogin: (state: { isLogin: boolean }) => state.isLogin,- },-}));--vi.mock('../BriefCard', () => ({- default: ({ brief }: { brief: MockBrief }) => <article>{brief.title}</article>,-}));--vi.mock('../BriefCardSkeleton', () => ({- BriefCardSkeleton: () => <div>Brief skeleton</div>,-}));--beforeEach(() => {- mocks.state.briefs = [];- mocks.state.isBriefsInit = true;- mocks.state.isLogin = true;- mocks.state.recommendationsVisible = true;- mocks.useFetchBriefs.mockClear();- mocks.useFetchBriefs.mockReturnValue({ error: undefined, isLoading: false, mutate: vi.fn() });-});--describe('DailyBrief', () => {- it('renders recommendations without the brief group header when no briefs are available', () => {- render(<DailyBrief />);-- expect(screen.getByText('Recommendations')).toBeInTheDocument();- expect(screen.queryByTestId('group-block')).not.toBeInTheDocument();- expect(screen.queryByText('Brief')).not.toBeInTheDocument();- expect(screen.queryByText('View all tasks')).not.toBeInTheDocument();- });-- it('renders the brief group header when briefs are available', () => {- mocks.state.briefs = [{ id: 'brief-1', title: 'Brief item' }];-- render(<DailyBrief />);-- expect(screen.getByTestId('group-block')).toBeInTheDocument();- expect(screen.getByText('Brief')).toBeInTheDocument();- expect(screen.getByText('Brief item')).toBeInTheDocument();- expect(screen.getByText('View all tasks')).toBeInTheDocument();- });-- it('renders a retryable error state when the first brief fetch fails', () => {- mocks.state.isBriefsInit = false;- mocks.useFetchBriefs.mockReturnValue({- error: new Error('brief fetch failed'),- isLoading: false,- mutate: vi.fn(),- });-- render(<DailyBrief />);-- expect(screen.getByTestId('group-block')).toBeInTheDocument();- expect(screen.getByText('Brief')).toBeInTheDocument();- expect(screen.getByTestId('async-error')).toBeInTheDocument();- expect(screen.queryByText('Brief skeleton')).not.toBeInTheDocument();- });-});diff --git a/src/features/DailyBrief/index.tsx b/src/features/DailyBrief/index.tsxdeleted file mode 100644index a015be2f6e4..00000000000--- a/src/features/DailyBrief/index.tsx+++ /dev/null@@ -1,98 +0,0 @@-import { Flexbox } from '@lobehub/ui';-import { Button } from '@lobehub/ui/base-ui';-import { Newspaper } from 'lucide-react';-import { memo } from 'react';-import { useTranslation } from 'react-i18next';--import AsyncError from '@/components/AsyncError';-import TopicChatDrawer from '@/features/AgentTasks/AgentTaskDetail/TopicChatDrawer';-import DocumentPreviewModal from '@/features/DocumentModal/Preview';-import Recommendations, { useRecommendationsVisible } from '@/features/Recommendations';-import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';-import GroupBlock from '@/routes/(main)/home/features/components/GroupBlock';-import { useBriefStore } from '@/store/brief';-import { briefListSelectors } from '@/store/brief/selectors';-import { useUserStore } from '@/store/user';-import { authSelectors } from '@/store/user/slices/auth/selectors';--import BriefCard from './BriefCard';-import { BriefCardSkeleton } from './BriefCardSkeleton';--const DailyBrief = memo(() => {- const { t } = useTranslation('home');- const navigate = useWorkspaceAwareNavigate();- const isLogin = useUserStore(authSelectors.isLogin);- const useFetchBriefs = useBriefStore((s) => s.useFetchBriefs);- const briefsSWR = useFetchBriefs(isLogin);-- const briefs = useBriefStore(briefListSelectors.briefs);- const isInit = useBriefStore(briefListSelectors.isBriefsInit);- const recommendationsVisible = useRecommendationsVisible();-- if (!isLogin) return null;-- if (briefsSWR.error && !isInit && !briefsSWR.isLoading) {- return (- <GroupBlock icon={Newspaper} title={t('brief.title')}>- <AsyncError- error={briefsSWR.error}- variant={'block'}- onRetry={() => {- void briefsSWR.mutate();- }}- />- </GroupBlock>- );- }-- if (!isInit) {- return (- <GroupBlock icon={Newspaper} title={t('brief.title')}>- <Flexbox gap={12}>- <BriefCardSkeleton />- <BriefCardSkeleton />- <Recommendations />- </Flexbox>- </GroupBlock>- );- }-- if (briefs.length === 0) {- // Without a titled brief block above it, the bare recommendations list- // doesn't need the full section gap below the input area — offset the- // parent's gap so it sits closer to the input.- return recommendationsVisible ? (- <Flexbox style={{ marginBlockStart: -24 }}>- <Recommendations />- </Flexbox>- ) : null;- }-- return (- <GroupBlock- actionAlwaysVisible- icon={Newspaper}- title={t('brief.title')}- action={- <Button size={'small'} type={'text'} onClick={() => navigate('/tasks')}>- {t('brief.viewAllTasks')}- </Button>- }- >- <Flexbox gap={12}>- {briefs.map((brief) => (- <BriefCard brief={brief} key={brief.id} />- ))}- <Recommendations />- </Flexbox>- {briefs.length > 0 && (- <>- <DocumentPreviewModal />- <TopicChatDrawer />- </>- )}- </GroupBlock>- );-});--export default DailyBrief;diff --git a/src/features/Fleet/useRunningTopics.ts b/src/features/Fleet/useRunningTopics.tsindex 8f641cdb537..7f22e479558 100644--- a/src/features/Fleet/useRunningTopics.ts+++ b/src/features/Fleet/useRunningTopics.ts@@ -2,19 +2,15 @@ import { useMemo } from 'react';import { useClientDataSWR } from '@/libs/swr';import { fleetKeys } from '@/libs/swr/keys';-import { topicService } from '@/services/topic';-import { type ChatTopic, type ChatTopicStatus } from '@/types/topic';+import { type TopicListItem, topicService } from '@/services/topic';+import { type ChatTopicStatus } from '@/types/topic';import { type FleetColumn, fleetColumnKey } from './types';// Topic statuses considered "actively running" for the Fleet board.const RUNNING_STATUSES: ChatTopicStatus[] = ['running'];-// queryTopics returns raw topic rows, which carry agentId even though the-// shared ChatTopic type does not declare it.-type RunningTopic = ChatTopic & { agentId?: string | null };--const toColumn = (topic: RunningTopic): FleetColumn | null => {+const toColumn = (topic: TopicListItem): FleetColumn | null => {if (!topic.agentId) return null;return {agentId: topic.agentId,@@ -47,7 +43,7 @@ export const useRunningTopics = () => {// list instead of flapping to "no running tasks".const hasHardError = Boolean(error) && data === undefined;- const running = useMemo(() => (data ?? []) as RunningTopic[], [data]);+ const running = useMemo(() => data ?? [], [data]);const columns = useMemo(() => running.map(toColumn).filter((c): c is FleetColumn => Boolean(c)),diff --git a/src/features/HomeInbox/InboxBriefCard.tsx b/src/features/HomeInbox/InboxBriefCard.tsxnew file mode 100644index 00000000000..1e6696c43d0--- /dev/null+++ b/src/features/HomeInbox/InboxBriefCard.tsx@@ -0,0 +1,128 @@+import { DEFAULT_AVATAR, INBOX_SESSION_ID } from '@lobechat/const';+import { Avatar, Block, Flexbox, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';+import { memo } from 'react';+import { useTranslation } from 'react-i18next';++import { DEFAULT_INBOX_AVATAR } from '@/const/meta';+import { taskDetailPath } from '@/features/AgentTasks/shared/taskDetailPath';+import BriefCardActions from '@/features/DailyBrief/BriefCardActions';+import BriefCardArtifacts from '@/features/DailyBrief/BriefCardArtifacts';+import BriefCardSummary from '@/features/DailyBrief/BriefCardSummary';+import { styles as briefStyles } from '@/features/DailyBrief/style';+import { type BriefItem } from '@/features/DailyBrief/types';+import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';+import Time from '@/routes/(main)/home/features/components/Time';++import StatusGlyph from './StatusGlyph';++const styles = createStaticStyles(({ css, cssVar }) => ({+ meta: css`+ cursor: pointer;+ `,+ taskName: css`+ overflow: hidden;++ font-size: 12px;+ color: ${cssVar.colorTextTertiary};+ text-overflow: ellipsis;+ white-space: nowrap;+ `,+ taskRef: css`+ flex: none;+ font-family: ${cssVar.fontFamilyCode};+ font-size: 11px;+ color: ${cssVar.colorTextTertiary};+ `,+}));++interface InboxBriefCardProps {+ brief: BriefItem;+}++/**+ * One row of "Needs you". The meta line (what state, which task, when) sits on+ * top spanning the full width; the agent avatar sits next to the *content* it+ * produced, not next to the metadata.+ */+const InboxBriefCard = memo<InboxBriefCardProps>(({ brief }) => {+ const { t } = useTranslation('common');+ const navigate = useWorkspaceAwareNavigate();++ const agent = brief.agent;+ const isInbox = agent?.id === INBOX_SESSION_ID;+ const canNavigate = Boolean(brief.taskId);++ const hasTaskMeta = Boolean(brief.taskStatus || brief.taskIdentifier || brief.taskName);++ const openTask = () => {+ if (!brief.taskId) return;+ navigate(taskDetailPath(brief.taskId, brief.agentId ?? undefined));+ };++ return (+ <Block+ className={briefStyles.card}+ gap={10}+ padding={12}+ style={{ borderRadius: cssVar.borderRadiusLG }}+ variant={'outlined'}+ >+ {/* A brief raised outside a task has no status / ref / name to show, which+ left the meta row as an empty band with a lone timestamp. Drop the row+ entirely in that case and let the title line carry the time. */}+ {hasTaskMeta && (+ <Flexbox+ horizontal+ align={'center'}+ className={canNavigate ? styles.meta : undefined}+ gap={7}+ onClick={canNavigate ? openTask : undefined}+ >+ {brief.taskStatus && <StatusGlyph status={brief.taskStatus} variant={'task'} />}+ {brief.taskIdentifier && <span className={styles.taskRef}>{brief.taskIdentifier}</span>}+ {brief.taskName && <span className={styles.taskName}>{brief.taskName}</span>}+ <Flexbox flex={1} />+ <Time date={brief.createdAt} />+ </Flexbox>+ )}++ <Flexbox horizontal align={'flex-start'} gap={10}>+ {agent && (+ <Avatar+ avatar={agent.avatar || (isInbox ? DEFAULT_INBOX_AVATAR : DEFAULT_AVATAR)}+ background={agent.backgroundColor || cssVar.colorBgContainer}+ shape={'circle'}+ size={28}+ style={{ flex: 'none' }}+ title={+ agent.title || (isInbox ? t('inbox.title', { ns: 'chat' }) : t('defaultSession'))+ }+ />+ )}+ <Flexbox flex={1} gap={6} style={{ minWidth: 0 }}>+ <Flexbox horizontal align={'center'} gap={8}>+ <Text ellipsis style={{ flex: 1, minWidth: 0 }} weight={500}>+ {brief.title}+ </Text>+ {!hasTaskMeta && <Time date={brief.createdAt} />}+ </Flexbox>+ <BriefCardSummary summary={brief.summary} />+ <BriefCardArtifacts artifacts={brief.artifacts} />+ </Flexbox>+ </Flexbox>++ <BriefCardActions+ actions={brief.actions}+ briefId={brief.id}+ briefType={brief.type}+ resolvedAction={brief.resolvedAction}+ taskId={brief.taskId}+ taskStatus={brief.taskStatus}+ topicId={brief.topicId}+ />+ </Block>+ );+});++export default InboxBriefCard;diff --git a/src/features/HomeInbox/NewsList.tsx b/src/features/HomeInbox/NewsList.tsxnew file mode 100644index 00000000000..ffa56f43e8c--- /dev/null+++ b/src/features/HomeInbox/NewsList.tsx@@ -0,0 +1,141 @@+import { Avatar, Flexbox, Icon, Markdown, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';+import { ChevronDownIcon, ChevronRightIcon } from 'lucide-react';+import { memo, useCallback, useState } from 'react';++import BriefCardArtifacts from '@/features/DailyBrief/BriefCardArtifacts';+import BriefIcon from '@/features/DailyBrief/BriefIcon';+import { type BriefItem } from '@/features/DailyBrief/types';+import Time from '@/routes/(main)/home/features/components/Time';+import { useBriefStore } from '@/store/brief';++const AVATAR_SIZE = 20;+const ROW_GAP = 10;+const ROW_PADDING_INLINE = 14;++const styles = createStaticStyles(({ css, cssVar }) => ({+ // Line the content up under the headline, past the leading avatar.+ body: css`+ padding-block-end: 12px;+ padding-inline: ${ROW_PADDING_INLINE + AVATAR_SIZE + ROW_GAP}px ${ROW_PADDING_INLINE}px;+ `,+ list: css`+ overflow: hidden;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};+ background: ${cssVar.colorBgContainer};+ `,+ row: css`+ cursor: pointer;+ padding-block: 11px;+ padding-inline: ${ROW_PADDING_INLINE}px;+ transition: background ${cssVar.motionDurationFast};++ &:hover {+ background: ${cssVar.colorFillQuaternary};+ }+ `,+ section: css`+ &:not(:last-child) {+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};+ }+ `,+}));++interface NewsItemProps {+ brief: BriefItem;+}++/**+ * One `insight` brief, collapsed to a single line. The agent that surfaced it+ * leads the row; opening it reads it (there is nothing to decide, so a glance+ * *is* the resolution) and drops the finding's detail inline.+ */+const NewsItem = memo<NewsItemProps>(({ brief }) => {+ const markBriefRead = useBriefStore((s) => s.markBriefRead);++ const [expanded, setExpanded] = useState(false);+ const [read, setRead] = useState(Boolean(brief.readAt));++ const toggle = useCallback(() => {+ setExpanded((prev) => {+ if (!prev && !read) {+ setRead(true);+ void markBriefRead(brief.id);+ }+ return !prev;+ });+ }, [brief.id, markBriefRead, read]);++ return (+ <Flexbox className={styles.section}>+ <Flexbox horizontal align={'center'} className={styles.row} gap={ROW_GAP} onClick={toggle}>+ {brief.agent?.avatar ? (+ <Avatar+ avatar={brief.agent.avatar}+ background={brief.agent.backgroundColor || cssVar.colorBgContainer}+ shape={'circle'}+ size={AVATAR_SIZE}+ // Fade the whole row once read: the leading glyph dims with the title+ // so a scanned item recedes as one, not just a lighter headline.+ style={{ flex: 'none', opacity: read ? 0.5 : 1 }}+ title={brief.agent.title ?? undefined}+ />+ ) : (+ <BriefIcon muted={read} type={brief.type} />+ )}+ <Text+ ellipsis+ weight={read ? 400 : 500}+ style={{+ color: read ? cssVar.colorTextTertiary : undefined,+ flex: 1,+ minWidth: 0,+ }}+ >+ {brief.title}+ </Text>+ <Time date={brief.createdAt} />+ <Icon+ color={cssVar.colorTextQuaternary}+ icon={expanded ? ChevronDownIcon : ChevronRightIcon}+ size={14}+ />+ </Flexbox>++ {expanded && (brief.summary || brief.artifacts) && (+ <Flexbox className={styles.body} gap={8}>+ {brief.summary && (+ <Markdown style={{ overflow: 'unset' }} variant={'chat'}>+ {brief.summary}+ </Markdown>+ )}+ <BriefCardArtifacts artifacts={brief.artifacts} />+ </Flexbox>+ )}+ </Flexbox>+ );+});++interface NewsListProps {+ news: BriefItem[];+}++/**+ * `insight` briefs: the agent found something worth knowing, but there is+ * nothing to decide. One line each — the detail lives behind the click, so a+ * week of findings still fits on screen.+ */+const NewsList = memo<NewsListProps>(({ news }) => {+ if (news.length === 0) return null;++ return (+ <Flexbox className={styles.list}>+ {news.map((brief) => (+ <NewsItem brief={brief} key={brief.id} />+ ))}+ </Flexbox>+ );+});++export default NewsList;diff --git a/src/features/HomeInbox/RunningTasksCard.tsx b/src/features/HomeInbox/RunningTasksCard.tsxnew file mode 100644index 00000000000..3eb36270b42--- /dev/null+++ b/src/features/HomeInbox/RunningTasksCard.tsx@@ -0,0 +1,162 @@+import { Avatar, Flexbox, Icon, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';+import { ChevronDownIcon, ChevronRightIcon } from 'lucide-react';+import { memo, useState } from 'react';+import { useTranslation } from 'react-i18next';++import RingLoadingIcon from '@/components/RingLoading';+import { useAgentDisplayMeta } from '@/features/AgentTasks/shared/useAgentDisplayMeta';++import TopicRow from './TopicRow';+import { type InboxTopic } from './useHomeInboxTopics';++const AVATAR_SIZE = 20;+/** Past this the stack turns into a smudge; the rest are counted instead. */+const MAX_AVATARS = 5;++const styles = createStaticStyles(({ css, cssVar }) => ({+ avatars: css`+ /* Overlap the stack so N agents read as one cluster, not a toolbar. */+ > *:not(:first-child) {+ margin-inline-start: -6px;+ }+ `,+ body: css`+ padding-block: 4px 8px;+ padding-inline: 8px;+ border-block-start: 1px solid ${cssVar.colorBorderSecondary};+ `,+ card: css`+ overflow: hidden;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};+ background: ${cssVar.colorBgContainer};+ `,+ head: css`+ cursor: pointer;+ padding-block: 11px;+ padding-inline: 14px;+ transition: background ${cssVar.motionDurationFast};++ &:hover {+ background: ${cssVar.colorFillQuaternary};+ }+ `,+ overflowCount: css`+ flex: none;+ margin-inline-start: 4px;+ font-size: 12px;+ color: ${cssVar.colorTextTertiary};+ `,+ // Ring in the card's own background so overlapping avatars stay separable.+ stackedAvatar: css`+ flex: none;+ box-shadow: 0 0 0 2px ${cssVar.colorBgContainer};+ `,+}));++/** One avatar of the collapsed stack. Its own component because `useAgentDisplayMeta` is a hook and the stack is a list. */+const StackedAgentAvatar = memo<{ agentId: string }>(({ agentId }) => {+ const agent = useAgentDisplayMeta(agentId);+ if (!agent) return null;++ return (+ <Avatar+ avatar={agent.avatar}+ background={agent.backgroundColor}+ className={styles.stackedAvatar}+ shape={'circle'}+ size={AVATAR_SIZE}+ title={agent.title}+ />+ );+});++/**+ * Who is working, without opening the card. A count alone ("3 tasks running")+ * says how much is in flight but not *whose* — and which agents are busy is the+ * thing the user actually recognises at a glance.+ */+const RunningAgentAvatars = memo<{ running: InboxTopic[] }>(({ running }) => {+ // One avatar per agent, not per topic: an agent running three topics is still+ // one face, and the count next to it already carries the volume.+ const agentIds = [...new Set(running.map((topic) => topic.agentId).filter(Boolean))] as string[];+ const shown = agentIds.slice(0, MAX_AVATARS);+ const overflow = agentIds.length - shown.length;++ if (shown.length === 0) return null;++ return (+ <Flexbox horizontal align={'center'} className={styles.avatars} flex={'none'}>+ {shown.map((agentId) => (+ <StackedAgentAvatar agentId={agentId} key={agentId} />+ ))}+ {overflow > 0 && <span className={styles.overflowCount}>+{overflow}</span>}+ </Flexbox>+ );+});++/**+ * The ring track is a translucent wash of the same warning color, so the+ * spinner reads as one glyph rather than a colored arc on a grey donut.+ */+const RING_COLOR = `color-mix(in srgb, ${cssVar.colorWarning} 45%, transparent)`;++interface RunningTasksCardProps {+ running: InboxTopic[];+}++/**+ * Runs that are executing fine need no attention — so this collapses to a+ * single line by default and only opens on demand. Nothing here is actionable;+ * it exists so the user knows work is in flight.+ */+const RunningTasksCard = memo<RunningTasksCardProps>(({ running }) => {+ const { t } = useTranslation('home');+ const [open, setOpen] = useState(false);++ if (running.length === 0) return null;++ return (+ <Flexbox className={styles.card}>+ <Flexbox+ horizontal+ align={'center'}+ className={styles.head}+ gap={10}+ onClick={() => setOpen((v) => !v)}+ >+ <RingLoadingIcon ringColor={RING_COLOR} size={16} style={{ color: cssVar.colorWarning }} />+ <Text fontSize={13} style={{ flex: 1 }} weight={500}>+ {t('inbox.running.title', { count: running.length })}+ </Text>+ <RunningAgentAvatars running={running} />+ <Icon+ color={cssVar.colorTextQuaternary}+ icon={open ? ChevronDownIcon : ChevronRightIcon}+ size={14}+ />+ </Flexbox>++ {open && (+ <Flexbox className={styles.body}>+ {running.map((topic) => (+ <TopicRow+ key={topic.id}+ topic={topic}+ leading={+ <RingLoadingIcon+ ringColor={RING_COLOR}+ size={14}+ style={{ color: cssVar.colorWarning }}+ />+ }+ />+ ))}+ </Flexbox>+ )}+ </Flexbox>+ );+});++export default RunningTasksCard;diff --git a/src/features/HomeInbox/StatusGlyph.tsx b/src/features/HomeInbox/StatusGlyph.tsxnew file mode 100644index 00000000000..d63de6e9b2b--- /dev/null+++ b/src/features/HomeInbox/StatusGlyph.tsx@@ -0,0 +1,39 @@+import type { ChatTopicStatus, TaskStatus } from '@lobechat/types';+import { Flexbox, Icon, Tooltip } from '@lobehub/ui';+import { memo } from 'react';+import { useTranslation } from 'react-i18next';++import { TASK_STATUS_VISUALS, TOPIC_STATUS_VISUALS } from '@/components/ExecutionStatus';++interface StatusGlyphProps {+ size?: number;+ status: ChatTopicStatus | TaskStatus;+ /** Tasks and topics share the visual family but not the full status set. */+ variant: 'task' | 'topic';+}++/**+ * The one true status glyph, straight from `ExecutionStatus.ts` — never invent+ * a second icon set for the same state. Note `task:paused` deliberately renders+ * as the "waiting for human" hand: it means *pending review*, not "suspended".+ */+const StatusGlyph = memo<StatusGlyphProps>(({ status, variant, size = 14 }) => {+ const { t } = useTranslation('chat');++ const visual =+ variant === 'task'+ ? TASK_STATUS_VISUALS[status as TaskStatus]+ : TOPIC_STATUS_VISUALS[status as ChatTopicStatus];++ if (!visual) return null;++ return (+ <Tooltip title={t(`taskDetail.status.${status}`, { defaultValue: status })}>+ <Flexbox flex={'none'}>+ <Icon color={visual.color} icon={visual.icon} size={size} />+ </Flexbox>+ </Tooltip>+ );+});++export default StatusGlyph;diff --git a/src/features/HomeInbox/TopicRow.tsx b/src/features/HomeInbox/TopicRow.tsxnew file mode 100644index 00000000000..929f82e1023--- /dev/null+++ b/src/features/HomeInbox/TopicRow.tsx@@ -0,0 +1,66 @@+import { AGENT_CHAT_TOPIC_URL } from '@lobechat/const';+import { Avatar, Flexbox, Text } from '@lobehub/ui';+import { createStaticStyles } from 'antd-style';+import { memo, type ReactNode } from 'react';++import { useAgentDisplayMeta } from '@/features/AgentTasks/shared/useAgentDisplayMeta';+import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';+import Time from '@/routes/(main)/home/features/components/Time';++import { type InboxTopic } from './useHomeInboxTopics';++const styles = createStaticStyles(({ css, cssVar }) => ({+ row: css`+ cursor: pointer;++ padding-block: 8px;+ padding-inline: 10px;+ border-radius: ${cssVar.borderRadius};++ transition: background ${cssVar.motionDurationFast};++ &:hover {+ background: ${cssVar.colorFillQuaternary};+ }+ `,+}));++interface TopicRowProps {+ /** Status glyph or live spinner — supplied by the caller so a running row can spin. */+ leading: ReactNode;+ topic: InboxTopic;+ trailing?: ReactNode;+}++const TopicRow = memo<TopicRowProps>(({ topic, leading, trailing }) => {+ const navigate = useWorkspaceAwareNavigate();+ const agent = useAgentDisplayMeta(topic.agentId);++ const open = () => {+ if (!topic.agentId) return;+ navigate(AGENT_CHAT_TOPIC_URL(topic.agentId, topic.id));+ };++ return (+ <Flexbox horizontal align={'center'} className={styles.row} gap={10} onClick={open}>+ {leading}+ {agent && (+ <Avatar+ avatar={agent.avatar}+ background={agent.backgroundColor}+ shape={'circle'}+ size={22}+ style={{ flex: 'none' }}+ title={agent.title}+ />+ )}+ <Text ellipsis fontSize={13} style={{ flex: 1, minWidth: 0 }}>+ {topic.title}+ </Text>+ {trailing}+ <Time date={topic.updatedAt ?? topic.createdAt} />+ </Flexbox>+ );+});++export default TopicRow;diff --git a/src/features/HomeInbox/UnreadTopicList.tsx b/src/features/HomeInbox/UnreadTopicList.tsxnew file mode 100644index 00000000000..c88c459ac01--- /dev/null+++ b/src/features/HomeInbox/UnreadTopicList.tsx@@ -0,0 +1,212 @@+import { type ConversationContext } from '@lobechat/types';+import { Avatar, Flexbox, Icon, Markdown, stopPropagation, Text } from '@lobehub/ui';+import { Button } from '@lobehub/ui/base-ui';+import { createStaticStyles, cssVar } from 'antd-style';+import { ChevronDownIcon, ChevronRightIcon, MessageSquarePlus } from 'lucide-react';+import { memo, useCallback, useState } from 'react';+import { useTranslation } from 'react-i18next';++import UnreadDot from '@/components/UnreadDot';+import RunReplyEditor from '@/features/AgentTasks/AgentTaskDetail/RunReplyEditor';+import { useAgentDisplayMeta } from '@/features/AgentTasks/shared/useAgentDisplayMeta';+import Time from '@/routes/(main)/home/features/components/Time';+import { useChatStore } from '@/store/chat';+import { useTaskStore } from '@/store/task';++import { type InboxTopic } from './useHomeInboxTopics';++const DOT_WIDTH = 14;+const ROW_GAP = 8;+const ROW_PADDING_INLINE = 14;+const AVATAR_SIZE = 20;++const styles = createStaticStyles(({ css, cssVar }) => ({+ // Line the reply up under the agent that wrote it, not under the unread dot.+ body: css`+ padding-block-end: 12px;+ padding-inline: ${ROW_PADDING_INLINE + DOT_WIDTH + ROW_GAP}px ${ROW_PADDING_INLINE}px;+ `,+ // Keeps the title from shifting left once the dot is gone.+ dotPlaceholder: css`+ flex: none;+ width: ${DOT_WIDTH}px;+ `,+ list: css`+ overflow: hidden;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};+ background: ${cssVar.colorBgContainer};+ `,+ row: css`+ cursor: pointer;+ padding-block: 11px;+ padding-inline: ${ROW_PADDING_INLINE}px;+ transition: background ${cssVar.motionDurationFast};++ &:hover {+ background: ${cssVar.colorFillQuaternary};+ }+ `,+ section: css`+ &:not(:last-child) {+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};+ }+ `,+}));++interface UnreadTopicItemProps {+ onFollowUpSent?: (topicId: string) => void;+ topic: InboxTopic;+}++/**+ * One unread run, collapsed to a single line. Opening it is the read: the last+ * reply drops in inline (up to the server's ~2000-char preview, tail elided with+ * `…`) — no second "show more" step, because the click that opened the row+ * already said "I want to read this". The full thread lives one click deeper, in+ * the chat drawer.+ */+const UnreadTopicItem = memo<UnreadTopicItemProps>(({ topic, onFollowUpSent }) => {+ const { t } = useTranslation('home');+ const agent = useAgentDisplayMeta(topic.agentId);+ const openTopicDrawer = useTaskStore((s) => s.openTopicDrawer);+ const updateTopicStatus = useChatStore((s) => s.updateTopicStatus);+ const sendMessage = useChatStore((s) => s.sendMessage);+ const prefetchMessages = useChatStore((s) => s.prefetchMessages);++ const [expanded, setExpanded] = useState(false);+ const [read, setRead] = useState(false);+ const [replying, setReplying] = useState(false);++ const agentId = topic.agentId ?? undefined;++ // Engaging with the row IS the read: this is an inbox, not a topic list — a row+ // the user has answered or opened has been triaged. The persisted status drops+ // it from the next inbox fetch; locally the row stays put so it doesn't yank+ // out from under the reader.+ const markRead = useCallback(() => {+ if (read) return;+ setRead(true);+ void updateTopicStatus({ agentId, status: 'active', topicId: topic.id });+ }, [agentId, read, topic.id, updateTopicStatus]);++ const toggle = useCallback(() => {+ setExpanded((prev) => {+ if (!prev) markRead();+ return !prev;+ });+ }, [markRead]);++ // View the full thread in the drawer — the "查看执行轨迹" analog for a run.+ const viewChat = useCallback(() => {+ if (!agentId) return;+ markRead();+ openTopicDrawer(topic.id, { agentId, title: topic.title ?? undefined });+ }, [agentId, markRead, openTopicDrawer, topic.id, topic.title]);++ // Reply in place, continuing the topic exactly like the chat drawer does:+ // hydrate the topic's messages into the store first so the reply threads onto+ // the last one (without it `sendMessage` reads an empty history and orphans+ // the message — no parentId), then send over the gateway so the run keeps+ // going server-side. No navigation.+ const submitFollowUp = useCallback(+ async (text: string) => {+ if (!agentId) return;+ markRead();+ const context: ConversationContext = {+ agentId,+ isolatedTopic: true,+ scope: 'main',+ topicId: topic.id,+ };+ await prefetchMessages(context);+ await sendMessage({ context, forceRuntime: 'gateway', message: text });+ setReplying(false);+ // Move the row into the running card immediately so the send visibly does+ // something; the hook reconciles with the server a beat later.+ onFollowUpSent?.(topic.id);+ },+ [agentId, markRead, onFollowUpSent, prefetchMessages, sendMessage, topic.id],+ );++ return (+ <Flexbox className={styles.section}>+ <Flexbox horizontal align={'center'} className={styles.row} gap={ROW_GAP} onClick={toggle}>+ {read ? <span className={styles.dotPlaceholder} /> : <UnreadDot />}+ {agent && (+ <Avatar+ avatar={agent.avatar}+ background={agent.backgroundColor}+ shape={'circle'}+ size={AVATAR_SIZE}+ style={{ flex: 'none' }}+ title={agent.title}+ />+ )}+ <Text ellipsis style={{ flex: 1, minWidth: 0 }} weight={read ? 400 : 500}>+ {topic.title}+ </Text>+ <Time date={topic.updatedAt ?? topic.createdAt} />+ <Icon+ color={cssVar.colorTextQuaternary}+ icon={expanded ? ChevronDownIcon : ChevronRightIcon}+ size={14}+ />+ </Flexbox>++ {expanded && (+ <Flexbox className={styles.body} gap={8}>+ {topic.lastAssistantMessage && (+ <Markdown style={{ overflow: 'unset' }} variant={'chat'}>+ {topic.lastAssistantMessage}+ </Markdown>+ )}++ {replying ? (+ <Flexbox onClick={stopPropagation}>+ <RunReplyEditor+ placeholder={t('inbox.unread.followUpPlaceholder')}+ onCancel={() => setReplying(false)}+ onSubmit={submitFollowUp}+ />+ </Flexbox>+ ) : (+ <Flexbox horizontal align={'center'} justify={'space-between'}>+ <Button size={'small'} type={'text'} onClick={viewChat}>+ {t('inbox.unread.viewChat')}+ </Button>+ <Button+ disabled={!agentId}+ icon={MessageSquarePlus}+ size={'small'}+ type={'fill'}+ onClick={() => setReplying(true)}+ >+ {t('inbox.unread.followUp')}+ </Button>+ </Flexbox>+ )}+ </Flexbox>+ )}+ </Flexbox>+ );+});++interface UnreadTopicListProps {+ onFollowUpSent?: (topicId: string) => void;+ topics: InboxTopic[];+}++/**+ * Runs that finished while you were away. One line each, like the news list —+ * a week of finished runs still fits on screen, and the reply is one click deep.+ */+const UnreadTopicList = memo<UnreadTopicListProps>(({ topics, onFollowUpSent }) => (+ <Flexbox className={styles.list}>+ {topics.map((topic) => (+ <UnreadTopicItem key={topic.id} topic={topic} onFollowUpSent={onFollowUpSent} />+ ))}+ </Flexbox>+));++export default UnreadTopicList;diff --git a/src/features/HomeInbox/index.tsx b/src/features/HomeInbox/index.tsxnew file mode 100644index 00000000000..071e34baa81--- /dev/null+++ b/src/features/HomeInbox/index.tsx@@ -0,0 +1,202 @@+import { Flexbox } from '@lobehub/ui';+import { createStaticStyles } from 'antd-style';+import { memo, type ReactNode, useMemo } from 'react';+import { useTranslation } from 'react-i18next';++import AsyncError from '@/components/AsyncError';+import TopicChatDrawer from '@/features/AgentTasks/AgentTaskDetail/TopicChatDrawer';+import { BriefCardSkeleton } from '@/features/DailyBrief/BriefCardSkeleton';+import DocumentPreviewModal from '@/features/DocumentModal/Preview';+import Recommendations, { useRecommendationsVisible } from '@/features/Recommendations';+import GroupBlock from '@/routes/(main)/home/features/components/GroupBlock';+import { useBriefStore } from '@/store/brief';+import { briefListSelectors } from '@/store/brief/selectors';+import { useUserStore } from '@/store/user';+import { authSelectors } from '@/store/user/slices/auth/selectors';++import InboxBriefCard from './InboxBriefCard';+import NewsList from './NewsList';+import RunningTasksCard from './RunningTasksCard';+import { splitBriefs } from './splitBriefs';+import UnreadTopicList from './UnreadTopicList';+import { useHomeInboxTopics } from './useHomeInboxTopics';++const styles = createStaticStyles(({ css, cssVar }) => ({+ count: css`+ margin-inline-start: 6px;+ font-variant-numeric: tabular-nums;+ color: ${cssVar.colorTextQuaternary};+ `,+ subtitle: css`+ margin-inline-start: 8px;+ font-size: 12px;+ font-weight: 400;+ color: ${cssVar.colorTextQuaternary};+ `,+}));++interface InboxSection {+ key: string;+ node: ReactNode;+ /** Omitted when the section labels itself (the running card names its own count). */+ title?: ReactNode;+}++/** How many are in the pile, next to what the pile is. */+const titleWithCount = (label: string, count: number, subtitle?: string): ReactNode => (+ <>+ {label}+ <span className={styles.count}>{count}</span>+ {subtitle && <span className={styles.subtitle}>· {subtitle}</span>}+ </>+);++/**+ * The home inbox: everything the agents did while you were away, sorted by+ * whether it needs you.+ *+ * - **Needs you** — briefs blocking an agent (decide / review / fix). Errors sink+ * to the bottom: a stuck decision blocks work right now, a failed run has+ * already stopped.+ * - **Unread** — runs that finished while you were away, each showing the agent's+ * last reply so the answer is right there.+ * - **Running** — collapsed to one line, showing who is working; a healthy run+ * needs nothing from you.+ * - **News** — `insight` briefs; read them or don't.+ *+ * Sections are siblings, never nested: each names itself and carries its own+ * count, and one absent section never hides another's heading.+ */+const HomeInbox = memo(() => {+ const { t } = useTranslation('home');+ const isLogin = useUserStore(authSelectors.isLogin);++ const useFetchBriefs = useBriefStore((s) => s.useFetchBriefs);+ const briefsSWR = useFetchBriefs(isLogin);+ const briefs = useBriefStore(briefListSelectors.briefs);+ const isBriefsInit = useBriefStore(briefListSelectors.isBriefsInit);++ const topics = useHomeInboxTopics(isLogin);+ const recommendationsVisible = useRecommendationsVisible();++ const { needsYou, news } = useMemo(() => splitBriefs(briefs), [briefs]);++ if (!isLogin) return null;++ // Both overlays open from a card in here and must outlive it — a followed-up+ // topic leaves the unread list the moment it's read.+ const overlays = (+ <>+ <DocumentPreviewModal />+ <TopicChatDrawer />+ </>+ );++ // The brief feed is the primary content; a first-load failure blocks the whole+ // surface. No fabricated section heading — we don't know what's under it yet.+ if (briefsSWR.error && !isBriefsInit && !briefsSWR.isLoading) {+ return (+ <>+ <AsyncError+ error={briefsSWR.error}+ variant={'block'}+ onRetry={() => {+ void briefsSWR.mutate();+ }}+ />+ {overlays}+ </>+ );+ }++ // First load: bare skeletons, no group heading (loading must not assert a+ // "Needs you" section that may turn out empty). Recommendations keep their own.+ if (!isBriefsInit) {+ return (+ <Flexbox gap={12}>+ <BriefCardSkeleton />+ <BriefCardSkeleton />+ <Recommendations />+ {overlays}+ </Flexbox>+ );+ }++ const sections: InboxSection[] = [];++ if (needsYou.length > 0)+ sections.push({+ key: 'needsYou',+ node: (+ <Flexbox gap={12}>+ {needsYou.map((brief) => (+ <InboxBriefCard brief={brief} key={brief.id} />+ ))}+ </Flexbox>+ ),+ title: titleWithCount(t('inbox.needsYou.title'), needsYou.length),+ });++ // A topic-feed failure must not be silent: without this the unread / running+ // sections would just vanish and the inbox would look empty-but-fine.+ if (topics.error)+ sections.push({+ key: 'topics-error',+ node: <AsyncError error={topics.error} variant={'inline'} onRetry={topics.reload} />,+ title: t('inbox.unread.title'),+ });++ if (topics.unread.length > 0)+ sections.push({+ key: 'unread',+ node: <UnreadTopicList topics={topics.unread} onFollowUpSent={topics.promoteToRunning} />,+ title: titleWithCount(t('inbox.unread.title'), topics.unread.length),+ });++ // No title: the card already says "3 tasks running" on its own head.+ if (topics.running.length > 0)+ sections.push({ key: 'running', node: <RunningTasksCard running={topics.running} /> });++ if (news.length > 0)+ sections.push({+ key: 'news',+ node: <NewsList news={news} />,+ title: titleWithCount(t('inbox.news.title'), news.length, t('inbox.news.subtitle')),+ });++ if (sections.length === 0) {+ // With no titled block above it, the bare recommendations list doesn't need+ // the full section gap below the input area — offset the parent's gap so it+ // sits closer to the input.+ return (+ <>+ {recommendationsVisible && (+ <Flexbox style={{ marginBlockStart: -24 }}>+ <Recommendations />+ </Flexbox>+ )}+ {overlays}+ </>+ );+ }++ return (+ <Flexbox gap={32}>+ {sections.map(({ key, node, title }) =>+ title ? (+ <GroupBlock key={key} title={title}>+ {node}+ </GroupBlock>+ ) : (+ <Flexbox key={key}>{node}</Flexbox>+ ),+ )}++ <Recommendations />++ {overlays}+ </Flexbox>+ );+});++export default HomeInbox;diff --git a/src/features/HomeInbox/splitBriefs.test.ts b/src/features/HomeInbox/splitBriefs.test.tsnew file mode 100644index 00000000000..d450df7b376--- /dev/null+++ b/src/features/HomeInbox/splitBriefs.test.ts@@ -0,0 +1,46 @@+import { describe, expect, it } from 'vitest';++import { type BriefItem } from '@/features/DailyBrief/types';++import { splitBriefs } from './splitBriefs';++const brief = (id: string, type: BriefItem['type']): BriefItem =>+ ({ id, summary: '', title: id, type }) as BriefItem;++describe('splitBriefs', () => {+ it('routes insight briefs to news and everything else to needsYou', () => {+ const { needsYou, news } = splitBriefs([+ brief('a', 'decision'),+ brief('b', 'insight'),+ brief('c', 'result'),+ brief('d', 'error'),+ ]);++ expect(needsYou.map((b) => b.id)).toEqual(['a', 'c', 'd']);+ expect(news.map((b) => b.id)).toEqual(['b']);+ });++ it('sinks errors to the bottom of needsYou', () => {+ const { needsYou } = splitBriefs([+ brief('err', 'error'),+ brief('res', 'result'),+ brief('dec', 'decision'),+ ]);++ expect(needsYou.map((b) => b.id)).toEqual(['dec', 'res', 'err']);+ });++ it('preserves server order within the same rank', () => {+ const { needsYou } = splitBriefs([+ brief('d1', 'decision'),+ brief('d2', 'decision'),+ brief('d3', 'decision'),+ ]);++ expect(needsYou.map((b) => b.id)).toEqual(['d1', 'd2', 'd3']);+ });++ it('returns empty groups for an empty feed', () => {+ expect(splitBriefs([])).toEqual({ needsYou: [], news: [] });+ });+});diff --git a/src/features/HomeInbox/splitBriefs.ts b/src/features/HomeInbox/splitBriefs.tsnew file mode 100644index 00000000000..6e6bdd6991a--- /dev/null+++ b/src/features/HomeInbox/splitBriefs.ts@@ -0,0 +1,33 @@+import { type BriefItem } from '@/features/DailyBrief/types';++/**+ * Within "Needs you", failures sink to the bottom: a stuck decision blocks the+ * agent right now, while a failed run has already stopped and can wait.+ */+const NEEDS_YOU_ORDER: Record<string, number> = {+ decision: 0,+ error: 9,+ result: 1,+};++export interface SplitBriefs {+ /** Briefs the user must act on — grouped as "Needs you", errors last. */+ needsYou: BriefItem[];+ /** `insight` briefs: nothing to decide, just worth a glance. */+ news: BriefItem[];+}++/**+ * Splits the unresolved brief feed by whether the user has to *do* something.+ * `decision` / `result` / `error` block an agent until answered; `insight` is+ * pure knowledge and belongs in a scannable list, not in a to-do pile.+ *+ * The server already sorts by priority then recency, so we only re-order within+ * "Needs you" — a stable sort keeps that ordering inside each rank.+ */+export const splitBriefs = (briefs: BriefItem[]): SplitBriefs => ({+ needsYou: briefs+ .filter((brief) => brief.type !== 'insight')+ .sort((a, b) => (NEEDS_YOU_ORDER[a.type] ?? 5) - (NEEDS_YOU_ORDER[b.type] ?? 5)),+ news: briefs.filter((brief) => brief.type === 'insight'),+});diff --git a/src/features/HomeInbox/useHomeInboxTopics.ts b/src/features/HomeInbox/useHomeInboxTopics.tsnew file mode 100644index 00000000000..b431d62bda4--- /dev/null+++ b/src/features/HomeInbox/useHomeInboxTopics.ts@@ -0,0 +1,79 @@+import { useMemo } from 'react';++import { useClientDataSWR } from '@/libs/swr';+import { homeInboxKeys } from '@/libs/swr/keys';+import { type TopicListItem, topicService } from '@/services/topic';+import { type ChatTopicStatus } from '@/types/topic';++/**+ * Everything the home inbox needs from topics, in one round trip. `queryTopics`+ * filters server-side by status, so widening this list costs nothing extra.+ */+const INBOX_STATUSES: ChatTopicStatus[] = ['running', 'unread'];++export type InboxTopic = TopicListItem;++export interface HomeInboxTopics {+ error: unknown;+ isInit: boolean;+ /**+ * Optimistically flip a just-replied topic to `running` so it moves out of+ * "unread" and into the running card the instant the user hits send — then+ * reconcile with the server once its status write has landed.+ */+ promoteToRunning: (topicId: string) => void;+ reload: () => void;+ /** Topics still executing — the collapsed "N running" card. */+ running: InboxTopic[];+ /** Topics that finished while the user was away and haven't been opened yet. */+ unread: InboxTopic[];+}++/**+ * Account-wide topic feed for the home inbox. Deliberately NOT reusing+ * `HomeRepository.getUnreadCounts()` — that one excludes cron/task-triggered+ * topics (it powers a sidebar badge), which are exactly the ones an agent+ * inbox must surface.+ */+export const useHomeInboxTopics = (isLogin: boolean | undefined): HomeInboxTopics => {+ const { data, error, isLoading, mutate } = useClientDataSWR(+ isLogin ? homeInboxKeys.topics(isLogin) : null,+ // `withLastMessage` is what makes an unread row readable: the card shows what+ // the agent actually said, not just the topic title it was filed under.+ () => topicService.queryTopics({ statuses: INBOX_STATUSES, withLastMessage: true }),+ // A live overview: refetch on focus almost immediately (default throttle is+ // 5min) so a run that just finished shows up the instant the user looks.+ { focusThrottleInterval: 1000 },+ );++ // Only a first-load failure is a hard error. A background poll error while we+ // still hold rows keeps the stale list instead of flapping to "nothing here".+ const hasHardError = Boolean(error) && data === undefined;+ const topics = useMemo(() => (data ?? []) as InboxTopic[], [data]);++ return useMemo(+ () => ({+ error: hasHardError ? error : undefined,+ isInit: !isLoading && !hasHardError,+ promoteToRunning: (topicId: string) => {+ // Instant: patch the cached row to `running` with no refetch, so the UI+ // responds on the same tick as the send. The server's own status write+ // lands a beat later, so reconcile after a short delay rather than+ // revalidating now and reading the row still `unread` (which would snap+ // it back to unread and look like the send did nothing).+ void mutate(+ (rows) =>+ (rows ?? []).map((row) =>+ row.id === topicId ? { ...row, status: 'running' as ChatTopicStatus } : row,+ ),+ { revalidate: false },+ );+ setTimeout(() => void mutate(), 1000);+ },+ reload: mutate,+ running: topics.filter((t) => t.status === 'running'),+ unread: topics.filter((t) => t.status === 'unread'),+ }),+ [topics, error, hasHardError, isLoading, mutate],+ );+};diff --git a/src/libs/swr/keys.ts b/src/libs/swr/keys.tsindex 679c0c98a91..1e685547ce0 100644--- a/src/libs/swr/keys.ts+++ b/src/libs/swr/keys.ts@@ -213,6 +213,12 @@ export const briefKeys = {list: def('brief:list', (isLogin: boolean) => ['brief:list', isLogin]),};+// ---- home inbox ---------------------------------------------------------+export const homeInboxKeys = {+ /** Account-wide topics powering the home inbox (running + unread + needs-input). */+ topics: def('home:inboxTopics', (isLogin: boolean) => ['home:inboxTopics', isLogin]),+};+// ---- agent config / available / search ----------------------------------// (agentKeys.list defined above)export const agentConfigKeys = {diff --git a/src/routes/(main)/agent/_layout/Sidebar/Topic/List/Item/index.tsx b/src/routes/(main)/agent/_layout/Sidebar/Topic/List/Item/index.tsxindex e8db7bf3cab..204b59e2082 100644--- a/src/routes/(main)/agent/_layout/Sidebar/Topic/List/Item/index.tsx+++ b/src/routes/(main)/agent/_layout/Sidebar/Topic/List/Item/index.tsx@@ -6,7 +6,7 @@ import {getTopicMetadataWorkingDirectorySourcePath,} from '@lobechat/utils/client/topic';import { Flexbox, Icon, Popover, Skeleton, Tag, Text, Tooltip } from '@lobehub/ui';-import { createStaticStyles, cssVar, keyframes, useTheme } from 'antd-style';+import { createStaticStyles, cssVar, useTheme } from 'antd-style';import dayjs from 'dayjs';import { HashIcon, MessageSquareDashed } from 'lucide-react';import type { CSSProperties, DragEvent } from 'react';@@ -17,6 +17,7 @@ import { useActiveWorkspaceSlug } from '@/business/client/hooks/useActiveWorkspaimport DotsLoading from '@/components/DotsLoading';import { TOPIC_STATUS_VISUALS } from '@/components/ExecutionStatus';import RingLoadingIcon from '@/components/RingLoading';+import UnreadDot from '@/components/UnreadDot';import { isDesktop } from '@/const/version';import DirIcon from '@/features/ChatInput/ControlBar/DirIcon';import { useHasDraft } from '@/features/ChatInput/draftStorage';@@ -40,17 +41,6 @@ import { getPullRequestState, getTopicMetaCard, PR_STATE_VISUAL } from './metaCaimport MetaHoverCard from './MetaHoverCard';import { useTopicItemDropdownMenu } from './useDropdownMenu';-const rippleAnim = keyframes`- 0% {- transform: scale(1);- opacity: 0.7;- }- 100% {- transform: scale(3);- opacity: 0;- }-`;-// Base UI Popover plays an opacity/scale enter+exit transition driven by these// CSS vars on the positioner. Zero them so the meta hover card appears instantly// instead of easing in — the hover-intent delay (`mouseEnterDelay`) still gates@@ -65,40 +55,6 @@ const META_HOVER_CARD_STYLES = {};const styles = createStaticStyles(({ css }) => ({- unreadWrapper: css`- position: relative;-- display: inline-flex;- align-items: center;- justify-content: center;-- width: 14px;- height: 14px;- `,- unreadDot: css`- position: relative;- z-index: 1;-- width: 6px;- height: 6px;- border-radius: 50%;-- background: ${cssVar.colorInfo};- `,- unreadRipple: css`- position: absolute;- inset: 0;-- width: 6px;- height: 6px;- margin: auto;- border: 1px solid ${cssVar.colorInfo};- border-radius: 50%;-- background: transparent;-- animation: ${rippleAnim} 1.8s ease-out infinite;- `,runningElapsedTime: css`flex: none;@@ -328,12 +284,7 @@ const TopicItem = memo<TopicItemProps>(const isRunningTailUnread = isMaskedRunningTail && !isTopicActive;const hasUnread = id && (isUnreadCompleted || isRunningTailUnread);- const unreadIcon = (- <span className={styles.unreadWrapper} data-testid="topic-unread-dot">- <span className={styles.unreadRipple} />- <span className={styles.unreadDot} />- </span>- );+ const unreadIcon = <UnreadDot />;useEffect(() => {if (!activeAgentId || !id || !isUnreadCompleted || hasLocalRunningRuntime) return;diff --git a/src/routes/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ByProjectMode/GroupItem.tsx b/src/routes/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ByProjectMode/GroupItem.tsxindex ffeabc7c760..e2d3020c0f5 100644--- a/src/routes/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ByProjectMode/GroupItem.tsx+++ b/src/routes/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ByProjectMode/GroupItem.tsx@@ -1,6 +1,6 @@import { AGENT_CHAT_URL } from '@lobechat/const';import { AccordionItem, ActionIcon, Center, Flexbox, Icon, Text, Tooltip } from '@lobehub/ui';-import { createStaticStyles, cssVar, cx, keyframes } from 'antd-style';+import { createStaticStyles, cssVar, cx } from 'antd-style';import { FolderClosedIcon, FolderOpenIcon, type LucideIcon, PlusIcon } from 'lucide-react';import { memo, useCallback, useMemo } from 'react';import { useTranslation } from 'react-i18next';@@ -9,6 +9,7 @@ import { useParams } from 'react-router';import { useActiveWorkspaceSlug } from '@/business/client/hooks/useActiveWorkspaceSlug';import { TOPIC_STATUS_VISUALS } from '@/components/ExecutionStatus';import RingLoadingIcon from '@/components/RingLoading';+import UnreadDot from '@/components/UnreadDot';import { isDesktop } from '@/const/version';import { useCommitWorkingDirectory } from '@/features/ChatInput/ControlBar/useCommitWorkingDirectory';import { resolveExecutionTarget } from '@/helpers/executionTarget';@@ -31,17 +32,6 @@ import {const PROJECT_GROUP_PREFIX = 'project:';-const rippleAnim = keyframes`- 0% {- transform: scale(1);- opacity: 0.7;- }- 100% {- transform: scale(3);- opacity: 0;- }-`;-const styles = createStaticStyles(({ css }) => ({statusBadge: css`display: inline-flex;@@ -70,40 +60,6 @@ const styles = createStaticStyles(({ css }) => ({color: ${cssVar.colorInfo};background: color-mix(in srgb, ${cssVar.colorInfo} 14%, transparent);`,- unreadDot: css`- position: relative;- z-index: 1;-- width: 6px;- height: 6px;- border-radius: 50%;-- background: ${cssVar.colorInfo};- `,- unreadRipple: css`- position: absolute;- inset: 0;-- width: 6px;- height: 6px;- margin: auto;- border: 1px solid ${cssVar.colorInfo};- border-radius: 50%;-- background: transparent;-- animation: ${rippleAnim} 1.8s ease-out infinite;- `,- unreadWrapper: css`- position: relative;-- display: inline-flex;- align-items: center;- justify-content: center;-- width: 14px;- height: 18px;- `,addTopicAction: css`pointer-events: none;@@ -191,10 +147,7 @@ const CollapsedUnreadDot = memo<{ count: number }>(({ count }) => {return (<Tooltip title={label}>- <span aria-label={label} className={styles.unreadWrapper} role="status">- <span className={styles.unreadRipple} />- <span className={styles.unreadDot} />- </span>+ <UnreadDot label={label} /></Tooltip>);});diff --git a/src/routes/(main)/home/features/components/GroupBlock/index.tsx b/src/routes/(main)/home/features/components/GroupBlock/index.tsxindex 27a7df6f125..336f1ca5752 100644--- a/src/routes/(main)/home/features/components/GroupBlock/index.tsx+++ b/src/routes/(main)/home/features/components/GroupBlock/index.tsx@@ -45,7 +45,7 @@ const GroupBlock = memo<GroupBlockProps>(justify={'flex-start'}style={{ overflow: 'hidden' }}>- <Icon color={cssVar.colorTextDescription} icon={icon} size={18} />+ {icon && <Icon color={cssVar.colorTextDescription} icon={icon} size={18} />}<Text ellipsis color={cssVar.colorTextSecondary}>{title}</Text>diff --git a/src/routes/(main)/home/features/index.tsx b/src/routes/(main)/home/features/index.tsxindex fed697c8937..6e909f3eeb0 100644--- a/src/routes/(main)/home/features/index.tsx+++ b/src/routes/(main)/home/features/index.tsx@@ -4,7 +4,7 @@ import { Flexbox } from '@lobehub/ui';import { memo } from 'react';import HomePromoBanner from '@/business/client/features/HomePromoBanner';-import DailyBrief from '@/features/DailyBrief';+import HomeInbox from '@/features/HomeInbox';import { useUserStore } from '@/store/user';import { authSelectors } from '@/store/user/slices/auth/selectors';@@ -26,7 +26,7 @@ const Home = memo(() => {<InputArea /></Flexbox>- {isLogin && <DailyBrief />}+ {isLogin && <HomeInbox />}</Flexbox>);});diff --git a/src/services/topic/index.ts b/src/services/topic/index.tsindex 4296fbbb865..0523e559daf 100644--- a/src/services/topic/index.ts+++ b/src/services/topic/index.ts@@ -10,6 +10,16 @@ import {type TopicRankItem,} from '@/types/topic';+/**+ * A row from `queryTopics`. It comes straight off the `topics` table, so it+ * carries `agentId` even though `ChatTopic` doesn't declare it, plus the+ * optional last-assistant-reply preview.+ */+export interface TopicListItem extends ChatTopic {+ agentId?: string | null;+ lastAssistantMessage?: string | null;+}+type OnboardingSessionMetadataPatch = Partial<NonNullable<ChatTopicMetadata['onboardingSession']>>;type UpdateTopicMetadataInput = Omit<Partial<ChatTopicMetadata>, 'onboardingSession'> & {@@ -60,7 +70,12 @@ export class TopicService {}) as any;};- queryTopics = (params?: { pageSize?: number; statuses?: string[] }): Promise<ChatTopic[]> => {+ queryTopics = (params?: {+ pageSize?: number;+ statuses?: string[];+ /** Pull each topic's last assistant reply (truncated) alongside the row. */+ withLastMessage?: boolean;+ }): Promise<TopicListItem[]> => {return lambdaClient.topic.queryTopics.query(params) as any;};diff --git a/src/store/brief/types.ts b/src/store/brief/types.tsindex f877376ae98..de909b088ee 100644--- a/src/store/brief/types.ts+++ b/src/store/brief/types.ts@@ -27,6 +27,9 @@ export interface BriefItem {resolvedComment: string | null;summary: string;taskId: string | null;+ /** Parent task's workspace-scoped ref (`T-12`). Populated by server enrichment; absent on locally-constructed BriefItems. */+ taskIdentifier?: string | null;+ taskName?: string | null;/** Parent task's runtime status — `scheduled` means the task is parked between automated runs and approving the brief should NOT complete it. Populated by server enrichment; optional on locally-constructed BriefItems (e.g. from activity rows). */taskStatus?: TaskStatus | null;title: string;diff --git a/src/store/chat/slices/agentRun/actions/__tests__/streamingExecutor.test.ts b/src/store/chat/slices/agentRun/actions/__tests__/streamingExecutor.test.tsindex 72024c6c51e..aae4a36b08e 100644--- a/src/store/chat/slices/agentRun/actions/__tests__/streamingExecutor.test.ts+++ b/src/store/chat/slices/agentRun/actions/__tests__/streamingExecutor.test.ts@@ -260,6 +260,93 @@ describe('StreamingExecutor actions', () => {streamSpy.mockRestore();});+ it('writes topics.status=running at run start so off-conversation surfaces see it', async () => {+ act(() => {+ useChatStore.setState({ executeClientAgent: realExecAgentRuntime });+ });++ const { result } = renderHook(() => useChatStore());+ const updateTopicStatusSpy = vi+ .spyOn(result.current, 'updateTopicStatus')+ .mockResolvedValue(undefined as any);++ const streamSpy = vi+ .spyOn(chatService, 'createAssistantMessageStream')+ .mockImplementation(async ({ onFinish }) => {+ await onFinish?.(TEST_CONTENT.AI_RESPONSE, {} as any);+ });++ await act(async () => {+ await result.current.executeClientAgent({+ context: { agentId: TEST_IDS.SESSION_ID, topicId: TEST_IDS.TOPIC_ID },+ messages: [+ {+ id: TEST_IDS.USER_MESSAGE_ID,+ role: 'user',+ content: TEST_CONTENT.USER_MESSAGE,+ sessionId: TEST_IDS.SESSION_ID,+ topicId: TEST_IDS.TOPIC_ID,+ } as UIChatMessage,+ ],+ parentMessageId: TEST_IDS.USER_MESSAGE_ID,+ parentMessageType: 'user',+ });+ });++ expect(updateTopicStatusSpy).toHaveBeenCalledWith(+ expect.objectContaining({+ agentId: TEST_IDS.SESSION_ID,+ status: 'running',+ topicId: TEST_IDS.TOPIC_ID,+ }),+ );++ updateTopicStatusSpy.mockRestore();+ streamSpy.mockRestore();+ });++ it('does not write a running status for a sub-agent run (it shares the topic)', async () => {+ act(() => {+ useChatStore.setState({ executeClientAgent: realExecAgentRuntime });+ });++ const { result } = renderHook(() => useChatStore());+ const updateTopicStatusSpy = vi+ .spyOn(result.current, 'updateTopicStatus')+ .mockResolvedValue(undefined as any);++ const streamSpy = vi+ .spyOn(chatService, 'createAssistantMessageStream')+ .mockImplementation(async ({ onFinish }) => {+ await onFinish?.(TEST_CONTENT.AI_RESPONSE, {} as any);+ });++ await act(async () => {+ await result.current.executeClientAgent({+ context: { agentId: TEST_IDS.SESSION_ID, topicId: TEST_IDS.TOPIC_ID },+ isSubAgent: true,+ messages: [+ {+ id: TEST_IDS.USER_MESSAGE_ID,+ role: 'user',+ content: TEST_CONTENT.USER_MESSAGE,+ sessionId: TEST_IDS.SESSION_ID,+ topicId: TEST_IDS.TOPIC_ID,+ } as UIChatMessage,+ ],+ parentMessageId: TEST_IDS.USER_MESSAGE_ID,+ parentMessageType: 'user',+ });+ });++ expect(updateTopicStatusSpy).not.toHaveBeenCalledWith(+ expect.objectContaining({ status: 'running' }),+ );++ updateTopicStatusSpy.mockRestore();+ streamSpy.mockRestore();+ });+it('should stop agent runtime loop when operation is cancelled before step execution', async () => {act(() => {useChatStore.setState({ executeClientAgent: realExecAgentRuntime });diff --git a/src/store/chat/slices/agentRun/actions/transports/client/streamingExecutor.ts b/src/store/chat/slices/agentRun/actions/transports/client/streamingExecutor.tsindex 8d6e9ad1706..b364c0af99f 100644--- a/src/store/chat/slices/agentRun/actions/transports/client/streamingExecutor.ts+++ b/src/store/chat/slices/agentRun/actions/transports/client/streamingExecutor.ts@@ -529,6 +529,27 @@ export class StreamingExecutorActionImpl {sourceType: 'client.runtime.start',});+ // Persist `running` on the topic so surfaces that read the stored status+ // rather than this tab's live operations — the home inbox and the Fleet+ // board — see the run in flight. The gateway/hetero transports already do+ // this; the client one didn't, so a client-driven run was invisible off the+ // active conversation. Top-level runs only (a sub-agent shares the topic and+ // would just rewrite the same status). The terminal lifecycle flips it back+ // (markTopicUnread / writeTopicStatus 'active'), with `cleanupStaleRunningTopics`+ // as the backstop if this tab dies mid-run.+ if (topicId && !isSubAgent) {+ const runningWrite = this.#get().updateTopicStatus?.({+ agentId,+ groupId,+ ...(scope === 'group' || scope === 'group_agent' ? { scope } : {}),+ status: 'running',+ topicId,+ });+ void runningWrite?.catch((error) => {+ console.error('[streamingExecutor] running status write failed:', error);+ });+ }+// Create a new array to avoid modifying the original messagesconst messages = [...originalMessages];diff --git a/src/store/task/selectors/detailSelectors.ts b/src/store/task/selectors/detailSelectors.tsindex d5e68bafe20..ccd4dfbeb21 100644--- a/src/store/task/selectors/detailSelectors.ts+++ b/src/store/task/selectors/detailSelectors.ts@@ -107,6 +107,16 @@ const taskSaveStatus = (s: TaskStoreState): SaveStatus =>const activeTopicDrawerTopicId = (s: TaskStoreState) => s.activeTopicDrawerTopicId;+/**+ * Which agent the open run drawer talks to. A run opened from a task detail+ * inherits the task's agent; one opened from the home inbox carries its own,+ * since the topic may have no parent task.+ */+const topicDrawerAgentId = (s: TaskStoreState) =>+ s.activeTopicDrawerAgentId ?? activeTaskAgentId(s);++const topicDrawerTitle = (s: TaskStoreState) => s.activeTopicDrawerTitle;+export const taskDetailSelectors = {activeTaskAgentId,activeTaskAutomationMode,@@ -143,4 +153,6 @@ export const taskDetailSelectors = {isTaskDetailLoading,taskDetailById,taskSaveStatus,+ topicDrawerAgentId,+ topicDrawerTitle,};diff --git a/src/store/task/slices/detail/action.ts b/src/store/task/slices/detail/action.tsindex 29295efeb66..f1d69593225 100644--- a/src/store/task/slices/detail/action.ts+++ b/src/store/task/slices/detail/action.ts@@ -231,6 +231,8 @@ export class TaskDetailSliceActionImpl {this.#set({activeTaskId: taskId,+ activeTopicDrawerAgentId: undefined,+ activeTopicDrawerTitle: undefined,activeTopicDrawerTopicId: undefined,},false,@@ -238,14 +240,35 @@ export class TaskDetailSliceActionImpl {);};- openTopicDrawer = (topicId: string): void => {+ /**+ * `topic` carries the agent and title for a run opened outside a task detail+ * (the home inbox lists plain topics too) — the drawer falls back to it when+ * no task detail is loaded to read them from.+ */+ openTopicDrawer = (topicId: string, topic?: { agentId?: string; title?: string }): void => {if (this.#get().activeTopicDrawerTopicId === topicId) return;- this.#set({ activeTopicDrawerTopicId: topicId }, false, 'openTopicDrawer');+ this.#set(+ {+ activeTopicDrawerAgentId: topic?.agentId,+ activeTopicDrawerTitle: topic?.title,+ activeTopicDrawerTopicId: topicId,+ },+ false,+ 'openTopicDrawer',+ );};closeTopicDrawer = (): void => {if (!this.#get().activeTopicDrawerTopicId) return;- this.#set({ activeTopicDrawerTopicId: undefined }, false, 'closeTopicDrawer');+ this.#set(+ {+ activeTopicDrawerAgentId: undefined,+ activeTopicDrawerTitle: undefined,+ activeTopicDrawerTopicId: undefined,+ },+ false,+ 'closeTopicDrawer',+ );};unpinDocument = async (taskId: string, documentId: string): Promise<void> => {diff --git a/src/store/task/slices/detail/initialState.ts b/src/store/task/slices/detail/initialState.tsindex 777ae7edb69..2af168b9a01 100644--- a/src/store/task/slices/detail/initialState.ts+++ b/src/store/task/slices/detail/initialState.ts@@ -4,6 +4,13 @@ import { type SaveStatus } from '@/types/saveState';export interface TaskDetailSliceState {activeTaskId?: string;+ /**+ * Topic-scoped fallbacks for a drawer opened outside a task detail — the home+ * inbox opens runs that may have no parent task at all, so there is no+ * `taskDetailMap` entry to read the agent / title from.+ */+ activeTopicDrawerAgentId?: string;+ activeTopicDrawerTitle?: string;activeTopicDrawerTopicId?: string;isCreatingTask: boolean;isDeletingTask: boolean;