🤯 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(chat-input): single send button, move send key choice to settings (#23261)
AmAzing-037396828fd6
diff --git a/locales/ar/chat.json b/locales/ar/chat.jsonindex 783e65bb887..0fc82818e2b 100644--- a/locales/ar/chat.json+++ b/locales/ar/chat.json@@ -1646,9 +1646,6 @@"inactive": "غير نشط","inbox.desc": "تعاون في مساحة عمل واحدة وحوّل الأفكار إلى نتائج.","inbox.title": "Lobe AI",- "input.addAi": "إضافة رسالة من الذكاء الاصطناعي",- "input.addAiPrefillUnsupported": "النموذج الحالي لا يدعم إنهاء المحادثة برسالة من المساعد. تابعها برسالة من المستخدم قبل الإرسال.",- "input.addUser": "إضافة رسالة من المستخدم","input.agentModeUnsupportedModel": "النموذج الحالي لا يدعم استدعاء الأدوات الوكيلية. قم بالتبديل إلى نموذج يدعم الوكيل للحصول على أفضل تجربة.","input.agentSlugMoved": "يفتح هذا الرابط الآن وكيلًا مختلفًا. يتم التبديل إليه — حاول مرة أخرى بمجرد فتحه. تم الاحتفاظ بمسودتك.","input.agentSlugUnconfirmed": "تعذر تأكيد الوكيل الذي يفتح هذا الرابط. تحقق من اتصالك، ثم حاول مرة أخرى.",diff --git a/locales/ar/hotkey.json b/locales/ar/hotkey.jsonindex 8894f2af2e7..f05736a2d5d 100644--- a/locales/ar/hotkey.json+++ b/locales/ar/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "أضف الإدخال الحالي كرسالة مستخدم دون بدء التوليد",- "addUserMessage.title": "إضافة رسالة مستخدم","commandPalette.desc": "افتح لوحة الأوامر العامة للوصول السريع إلى الميزات","commandPalette.title": "لوحة الأوامر","deleteAndRegenerateMessage.desc": "حذف الرسالة الأخيرة وإعادة توليدها",diff --git a/locales/bg-BG/chat.json b/locales/bg-BG/chat.jsonindex 81c9132b6e1..1d2f3ba8456 100644--- a/locales/bg-BG/chat.json+++ b/locales/bg-BG/chat.json@@ -1648,9 +1648,6 @@"inactive": "Неактивен","inbox.desc": "Сътрудничете в едно Работно пространство и превръщайте идеите в резултати.","inbox.title": "Lobe AI",- "input.addAi": "Добави AI съобщение",- "input.addAiPrefillUnsupported": "Текущият модел не поддържа завършване на разговора със съобщение от асистента. Следвайте го със съобщение от потребителя преди изпращане.",- "input.addUser": "Добави потребителско съобщение","input.agentModeUnsupportedModel": "Текущият модел не поддържа агентски инструменти. Превключете към модел с агентски възможности за най-добро изживяване.","input.agentSlugMoved": "Тази връзка сега отваря друг агент. Превключване към него — опитайте отново, след като се отвори. Вашият чернови е запазен.","input.agentSlugUnconfirmed": "Не можа да се потвърди кой агент отваря тази връзка. Проверете връзката си, след това опитайте отново.",diff --git a/locales/bg-BG/hotkey.json b/locales/bg-BG/hotkey.jsonindex 685ab97a54f..456e1cbff07 100644--- a/locales/bg-BG/hotkey.json+++ b/locales/bg-BG/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Добавете текущия вход като потребителско съобщение без да се задейства генериране",- "addUserMessage.title": "Добавяне на потребителско съобщение","commandPalette.desc": "Отворете глобалната палитра с команди за бърз достъп до функциите","commandPalette.title": "Палитра с команди","deleteAndRegenerateMessage.desc": "Изтрийте последното съобщение и го генерирайте отново",diff --git a/locales/de-DE/chat.json b/locales/de-DE/chat.jsonindex 76acb515c0d..83996469619 100644--- a/locales/de-DE/chat.json+++ b/locales/de-DE/chat.json@@ -1646,9 +1646,6 @@"inactive": "Inaktiv","inbox.desc": "Arbeiten Sie gemeinsam in einem Workspace und verwandeln Sie Ideen in Ergebnisse.","inbox.title": "Lobe AI",- "input.addAi": "KI-Nachricht hinzufügen",- "input.addAiPrefillUnsupported": "Das aktuelle Modell unterstützt es nicht, das Gespräch mit einer Assistentennachricht zu beenden. Fügen Sie vor dem Senden eine Benutzernachricht hinzu.",- "input.addUser": "Benutzernachricht hinzufügen","input.agentModeUnsupportedModel": "Das aktuelle Modell unterstützt keine agentischen Werkzeugaufrufe. Wechseln Sie zu einem Modell mit Agentenfähigkeit für die beste Erfahrung.","input.agentSlugMoved": "Dieser Link öffnet jetzt einen anderen Agenten. Wechseln Sie zu ihm — versuchen Sie es erneut, sobald er geöffnet ist. Ihr Entwurf wird beibehalten.","input.agentSlugUnconfirmed": "Es konnte nicht bestätigt werden, welcher Agent durch diesen Link geöffnet wird. Überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.",diff --git a/locales/de-DE/hotkey.json b/locales/de-DE/hotkey.jsonindex 972c8e64013..071fc6001a8 100644--- a/locales/de-DE/hotkey.json+++ b/locales/de-DE/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Füge die aktuelle Eingabe als Benutzernachricht hinzu, ohne die Generierung auszulösen",- "addUserMessage.title": "Benutzernachricht hinzufügen","commandPalette.desc": "Öffne die globale Befehlspalette für schnellen Zugriff auf Funktionen","commandPalette.title": "Befehlspalette","deleteAndRegenerateMessage.desc": "Lösche die letzte Nachricht und generiere sie neu",diff --git a/locales/en-US/chat.json b/locales/en-US/chat.jsonindex 179debc1e6d..f58577408bd 100644--- a/locales/en-US/chat.json+++ b/locales/en-US/chat.json@@ -1693,9 +1693,6 @@"inactive": "Inactive","inbox.desc": "Collaborate in one Workspace and move ideas into outcomes.","inbox.title": "Lobe AI",- "input.addAi": "Add an AI message",- "input.addAiPrefillUnsupported": "The current model doesn’t support ending the conversation with an assistant message. Follow it with a user message before sending.",- "input.addUser": "Add a user message","input.agentModeUnsupportedModel": "The current model doesn’t support agentic tool calling. Switch to a model with agent capability for the best experience.","input.agentRunFeeUnfunded.desc": "Each agent run carries a fee, even on your own API key. Top up or upgrade your plan, then send again.","input.agentRunFeeUnfunded.descOverflow": "Each agent run carries a fee, even on your own API key. Your balance covers it: use your balance, then send again.",diff --git a/locales/en-US/hotkey.json b/locales/en-US/hotkey.jsonindex baa9bdd3611..54d200b8945 100644--- a/locales/en-US/hotkey.json+++ b/locales/en-US/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Add the current input as a user message without triggering generation",- "addUserMessage.title": "Add a User Message","commandPalette.desc": "Open the global command palette for quick access to features","commandPalette.title": "Command Palette","deleteAndRegenerateMessage.desc": "Delete the last message and regenerate",diff --git a/locales/en-US/setting.json b/locales/en-US/setting.jsonindex 3aee0fcd5d6..2213ba4e458 100644--- a/locales/en-US/setting.json+++ b/locales/en-US/setting.json@@ -1178,8 +1178,8 @@"hotkey.invalidCombination": "The hotkey must include at least one modifier key (Ctrl, Alt, Shift) and one regular key","hotkey.record": "Press a key to record the hotkey","hotkey.reset": "Reset to default hotkeys",- "hotkey.sendKey.desc": "The other combination inserts a new line",- "hotkey.sendKey.title": "Send message",+ "hotkey.sendMessage.desc": "The other key combination inserts a line break",+ "hotkey.sendMessage.title": "Send Message","hotkey.title": "Hotkeys","hotkey.updateError": "Failed to update hotkey: Network or system error","hotkey.updateSuccess": "Hotkey updated successfully",diff --git a/locales/es-ES/chat.json b/locales/es-ES/chat.jsonindex 7da1d94449c..b3ada9e996c 100644--- a/locales/es-ES/chat.json+++ b/locales/es-ES/chat.json@@ -1646,9 +1646,6 @@"inactive": "Inactivo","inbox.desc": "Colabora en un solo espacio de trabajo y convierte ideas en resultados.","inbox.title": "Lobe AI",- "input.addAi": "Agregar mensaje de IA",- "input.addAiPrefillUnsupported": "El modelo actual no admite finalizar la conversación con un mensaje del asistente. Continúe con un mensaje del usuario antes de enviar.",- "input.addUser": "Agregar mensaje de usuario","input.agentModeUnsupportedModel": "El modelo actual no admite llamadas de herramientas agenticas. Cambia a un modelo con capacidad de agente para obtener la mejor experiencia.","input.agentSlugMoved": "Este enlace ahora abre un agente diferente. Cambiando a él — intenta de nuevo una vez que se abra. Tu borrador se ha guardado.","input.agentSlugUnconfirmed": "No se pudo confirmar qué agente abre este enlace. Verifica tu conexión y vuelve a intentarlo.",diff --git a/locales/es-ES/hotkey.json b/locales/es-ES/hotkey.jsonindex 290f861efda..6cf2a4edda2 100644--- a/locales/es-ES/hotkey.json+++ b/locales/es-ES/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Agregar la entrada actual como un mensaje de usuario sin activar la generación",- "addUserMessage.title": "Agregar un mensaje de usuario","commandPalette.desc": "Abrir el panel de comandos global para acceder rápidamente a las funciones","commandPalette.title": "Panel de comandos","deleteAndRegenerateMessage.desc": "Eliminar el último mensaje y regenerarlo",diff --git a/locales/fa-IR/chat.json b/locales/fa-IR/chat.jsonindex 75d566f0ddb..a5d49fadf4a 100644--- a/locales/fa-IR/chat.json+++ b/locales/fa-IR/chat.json@@ -1648,9 +1648,6 @@"inactive": "غیرفعال","inbox.desc": "در یک فضای کاری مشترک همکاری کنید و ایدهها را به نتایج تبدیل کنید.","inbox.title": "Lobe AI",- "input.addAi": "افزودن پیام هوش مصنوعی",- "input.addAiPrefillUnsupported": "مدل فعلی از پایان دادن به مکالمه با پیام دستیار پشتیبانی نمیکند. قبل از ارسال، آن را با پیام کاربر دنبال کنید.",- "input.addUser": "افزودن پیام کاربر","input.agentModeUnsupportedModel": "مدل فعلی از فراخوانی ابزارهای عامل پشتیبانی نمیکند. برای بهترین تجربه به مدلی با قابلیت عامل تغییر دهید.","input.agentSlugMoved": "این لینک اکنون یک عامل متفاوت را باز میکند. در حال تغییر به آن هستیم — پس از باز شدن دوباره امتحان کنید. پیشنویس شما حفظ شده است.","input.agentSlugUnconfirmed": "نتوانستیم تأیید کنیم که این لینک کدام عامل را باز میکند. اتصال خود را بررسی کنید و دوباره امتحان کنید.",diff --git a/locales/fa-IR/hotkey.json b/locales/fa-IR/hotkey.jsonindex 46974e54cd3..c02108bfcb4 100644--- a/locales/fa-IR/hotkey.json+++ b/locales/fa-IR/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "افزودن ورودی فعلی بهعنوان پیام کاربر بدون شروع تولید پاسخ",- "addUserMessage.title": "افزودن پیام کاربر","commandPalette.desc": "باز کردن پنل فرمان جهانی برای دسترسی سریع به قابلیتها","commandPalette.title": "پنل فرمان","deleteAndRegenerateMessage.desc": "حذف آخرین پیام و تولید مجدد آن",diff --git a/locales/fr-FR/chat.json b/locales/fr-FR/chat.jsonindex 5c922b36072..aff1768cb15 100644--- a/locales/fr-FR/chat.json+++ b/locales/fr-FR/chat.json@@ -1648,9 +1648,6 @@"inactive": "Inactif","inbox.desc": "Collaborez dans un espace de travail unique et transformez les idées en résultats.","inbox.title": "Lobe IA",- "input.addAi": "Ajouter un message IA",- "input.addAiPrefillUnsupported": "Le modèle actuel ne prend pas en charge la fin de la conversation avec un message de l'assistant. Suivez-le avec un message utilisateur avant d'envoyer.",- "input.addUser": "Ajouter un message utilisateur","input.agentModeUnsupportedModel": "Le modèle actuel ne prend pas en charge l'appel d'outils agentiques. Passez à un modèle avec des capacités d'agent pour une meilleure expérience.","input.agentSlugMoved": "Ce lien ouvre désormais un autre agent. Passage à celui-ci — réessayez une fois qu'il est ouvert. Votre brouillon est conservé.","input.agentSlugUnconfirmed": "Impossible de confirmer quel agent ce lien ouvre. Vérifiez votre connexion, puis réessayez.",diff --git a/locales/fr-FR/hotkey.json b/locales/fr-FR/hotkey.jsonindex 396173d0f27..04594e4d963 100644--- a/locales/fr-FR/hotkey.json+++ b/locales/fr-FR/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Ajouter l'entrée actuelle comme message utilisateur sans déclencher la génération",- "addUserMessage.title": "Ajouter un message utilisateur","commandPalette.desc": "Ouvrir la palette de commandes globale pour un accès rapide aux fonctionnalités","commandPalette.title": "Palette de commandes","deleteAndRegenerateMessage.desc": "Supprimer le dernier message et le régénérer",diff --git a/locales/it-IT/chat.json b/locales/it-IT/chat.jsonindex b5bf376b0af..c6e1039df3f 100644--- a/locales/it-IT/chat.json+++ b/locales/it-IT/chat.json@@ -1648,9 +1648,6 @@"inactive": "Inattivo","inbox.desc": "Collabora in un unico Spazio di Lavoro e trasforma le idee in risultati.","inbox.title": "Lobe AI",- "input.addAi": "Aggiungi un messaggio AI",- "input.addAiPrefillUnsupported": "Il modello attuale non supporta la conclusione della conversazione con un messaggio dell'assistente. Seguilo con un messaggio dell'utente prima di inviarlo.",- "input.addUser": "Aggiungi un messaggio utente","input.agentModeUnsupportedModel": "Il modello attuale non supporta la chiamata di strumenti agentici. Passa a un modello con capacità agentiche per la migliore esperienza.","input.agentSlugMoved": "Questo link ora apre un agente diverso. Passaggio a esso — riprova una volta aperto. La tua bozza è stata conservata.","input.agentSlugUnconfirmed": "Impossibile confermare quale agente apre questo link. Controlla la tua connessione, quindi riprova.",diff --git a/locales/it-IT/hotkey.json b/locales/it-IT/hotkey.jsonindex 7f89e05c20c..24418c6103b 100644--- a/locales/it-IT/hotkey.json+++ b/locales/it-IT/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Aggiungi l'input corrente come messaggio utente senza avviare la generazione",- "addUserMessage.title": "Aggiungi un Messaggio Utente","commandPalette.desc": "Apri la palette comandi globale per accedere rapidamente alle funzionalità","commandPalette.title": "Palette Comandi","deleteAndRegenerateMessage.desc": "Elimina l'ultimo messaggio e rigenera",diff --git a/locales/ja-JP/chat.json b/locales/ja-JP/chat.jsonindex 08053e040db..b8f6f8ed1c8 100644--- a/locales/ja-JP/chat.json+++ b/locales/ja-JP/chat.json@@ -1648,9 +1648,6 @@"inactive": "非アクティブ","inbox.desc": "同一空間で協力し、アイデアを結果に推進します","inbox.title": "Lobe AI",- "input.addAi": "アシスタントメッセージを追加",- "input.addAiPrefillUnsupported": "現在のモデルは、アシスタントメッセージで会話を終了することをサポートしていません。送信する前にユーザーメッセージを追加してください。",- "input.addUser": "ユーザーメッセージを追加","input.agentModeUnsupportedModel": "現在のモデルはエージェントツールの呼び出しをサポートしていません。エージェント機能を備えたモデルに切り替えると、最適な体験が得られます。","input.agentSlugMoved": "このリンクは現在別のエージェントを開きます。切り替え中です — 開いたらもう一度お試しください。下書きは保持されています。","input.agentSlugUnconfirmed": "このリンクがどのエージェントを開くか確認できませんでした。接続を確認してから、もう一度お試しください。",diff --git a/locales/ja-JP/hotkey.json b/locales/ja-JP/hotkey.jsonindex 0076b1823b4..57c66f170dd 100644--- a/locales/ja-JP/hotkey.json+++ b/locales/ja-JP/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "現在の入力内容をユーザーメッセージとして追加しますが、生成はトリガーしません",- "addUserMessage.title": "ユーザーメッセージを追加","commandPalette.desc": "グローバルコマンドパレットを開いて機能に素早くアクセス","commandPalette.title": "コマンドパレット","deleteAndRegenerateMessage.desc": "最後のメッセージを削除して再生成する",diff --git a/locales/ko-KR/chat.json b/locales/ko-KR/chat.jsonindex 8e396a7cdc7..e42faefad63 100644--- a/locales/ko-KR/chat.json+++ b/locales/ko-KR/chat.json@@ -1646,9 +1646,6 @@"inactive": "비활성","inbox.desc": "동일한 공간에서 협력하여 아이디어를 결과로 만듭니다","inbox.title": "Lobe AI",- "input.addAi": "도우미 메시지 추가",- "input.addAiPrefillUnsupported": "현재 모델은 어시스턴트 메시지로 대화를 종료하는 것을 지원하지 않습니다. 사용자 메시지를 추가한 후 전송하세요.",- "input.addUser": "사용자 메시지 추가","input.agentModeUnsupportedModel": "현재 모델은 에이전트 도구 호출을 지원하지 않습니다. 최상의 경험을 위해 에이전트 기능이 있는 모델로 전환하세요.","input.agentSlugMoved": "이 링크는 이제 다른 에이전트를 엽니다. 전환 중입니다 — 열리면 다시 시도하세요. 초안은 유지됩니다.","input.agentSlugUnconfirmed": "이 링크가 어떤 에이전트를 여는지 확인할 수 없습니다. 연결을 확인한 후 다시 시도하세요.",diff --git a/locales/ko-KR/hotkey.json b/locales/ko-KR/hotkey.jsonindex d53e78788b9..73a46d88eb0 100644--- a/locales/ko-KR/hotkey.json+++ b/locales/ko-KR/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "현재 입력한 내용을 사용자 메시지로 추가하지만 생성은 트리거하지 않음",- "addUserMessage.title": "사용자 메시지 추가","commandPalette.desc": "전역 명령 팔레트를 열어 기능에 빠르게 접근합니다","commandPalette.title": "명령 팔레트","deleteAndRegenerateMessage.desc": "마지막 메시지를 삭제하고 다시 생성합니다",diff --git a/locales/nl-NL/chat.json b/locales/nl-NL/chat.jsonindex 34707185ea9..25def744fa2 100644--- a/locales/nl-NL/chat.json+++ b/locales/nl-NL/chat.json@@ -1648,9 +1648,6 @@"inactive": "Inactief","inbox.desc": "Werk samen in één werkruimte en zet ideeën om in resultaten.","inbox.title": "Lobe AI",- "input.addAi": "AI-bericht toevoegen",- "input.addAiPrefillUnsupported": "Het huidige model ondersteunt het beëindigen van het gesprek met een assistentbericht niet. Voeg een gebruikersbericht toe voordat je verzendt.",- "input.addUser": "Gebruikersbericht toevoegen","input.agentModeUnsupportedModel": "Het huidige model ondersteunt geen agentische tooloproepen. Schakel over naar een model met agentmogelijkheden voor de beste ervaring.","input.agentSlugMoved": "Deze link opent nu een andere agent. Overschakelen — probeer opnieuw zodra deze opent. Je concept wordt bewaard.","input.agentSlugUnconfirmed": "Kon niet bevestigen welke agent deze link opent. Controleer je verbinding en probeer het opnieuw.",diff --git a/locales/nl-NL/hotkey.json b/locales/nl-NL/hotkey.jsonindex 7f5b2461605..c69d10d4d0f 100644--- a/locales/nl-NL/hotkey.json+++ b/locales/nl-NL/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Voeg de huidige invoer toe als een gebruikersbericht zonder generatie te starten",- "addUserMessage.title": "Gebruikersbericht Toevoegen","commandPalette.desc": "Open de globale opdrachtpalet voor snelle toegang tot functies","commandPalette.title": "Opdrachtpalet","deleteAndRegenerateMessage.desc": "Verwijder het laatste bericht en genereer opnieuw",diff --git a/locales/pl-PL/chat.json b/locales/pl-PL/chat.jsonindex d5b3f6d8817..f1121673c83 100644--- a/locales/pl-PL/chat.json+++ b/locales/pl-PL/chat.json@@ -1646,9 +1646,6 @@"inactive": "Nieaktywny","inbox.desc": "Współpracuj w jednym środowisku i przekształcaj pomysły w rezultaty.","inbox.title": "Lobe AI",- "input.addAi": "Dodaj wiadomość AI",- "input.addAiPrefillUnsupported": "Obecny model nie obsługuje zakończenia rozmowy wiadomością asystenta. Dodaj wiadomość użytkownika przed wysłaniem.",- "input.addUser": "Dodaj wiadomość użytkownika","input.agentModeUnsupportedModel": "Obecny model nie obsługuje agentowego wywoływania narzędzi. Przełącz się na model z funkcją agenta, aby uzyskać najlepsze doświadczenie.","input.agentSlugMoved": "Ten link teraz otwiera innego agenta. Przełączanie — spróbuj ponownie, gdy się otworzy. Twój szkic został zachowany.","input.agentSlugUnconfirmed": "Nie udało się potwierdzić, którego agenta otwiera ten link. Sprawdź swoje połączenie, a następnie spróbuj ponownie.",diff --git a/locales/pl-PL/hotkey.json b/locales/pl-PL/hotkey.jsonindex 0d5e2b847f8..82626a26c04 100644--- a/locales/pl-PL/hotkey.json+++ b/locales/pl-PL/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Dodaj bieżący wpis jako wiadomość użytkownika bez uruchamiania generowania",- "addUserMessage.title": "Dodaj wiadomość użytkownika","commandPalette.desc": "Otwórz globalną paletę poleceń, aby szybko uzyskać dostęp do funkcji","commandPalette.title": "Paleta poleceń","deleteAndRegenerateMessage.desc": "Usuń ostatnią wiadomość i wygeneruj ponownie",diff --git a/locales/pt-BR/chat.json b/locales/pt-BR/chat.jsonindex 503c343259c..a288f3c1eab 100644--- a/locales/pt-BR/chat.json+++ b/locales/pt-BR/chat.json@@ -1646,9 +1646,6 @@"inactive": "Inativo","inbox.desc": "Colabore em um único Espaço de Trabalho e transforme ideias em resultados.","inbox.title": "Lobe AI",- "input.addAi": "Adicionar mensagem de IA",- "input.addAiPrefillUnsupported": "O modelo atual não suporta encerrar a conversa com uma mensagem do assistente. Siga com uma mensagem do usuário antes de enviar.",- "input.addUser": "Adicionar mensagem de usuário","input.agentModeUnsupportedModel": "O modelo atual não suporta chamadas de ferramentas agentivas. Troque para um modelo com capacidade agentiva para uma melhor experiência.","input.agentSlugMoved": "Este link agora abre um agente diferente. Alternando para ele — tente novamente assim que abrir. Seu rascunho foi mantido.","input.agentSlugUnconfirmed": "Não foi possível confirmar qual agente este link abre. Verifique sua conexão e tente novamente.",diff --git a/locales/pt-BR/hotkey.json b/locales/pt-BR/hotkey.jsonindex c87d8c19fa8..d8830e003fe 100644--- a/locales/pt-BR/hotkey.json+++ b/locales/pt-BR/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Adicione a entrada atual como uma mensagem do usuário sem iniciar a geração",- "addUserMessage.title": "Adicionar Mensagem do Usuário","commandPalette.desc": "Abra o painel de comandos global para acesso rápido às funcionalidades","commandPalette.title": "Painel de Comandos","deleteAndRegenerateMessage.desc": "Excluir a última mensagem e gerar novamente",diff --git a/locales/ru-RU/chat.json b/locales/ru-RU/chat.jsonindex a9039db0a64..45e53fbe5be 100644--- a/locales/ru-RU/chat.json+++ b/locales/ru-RU/chat.json@@ -1646,9 +1646,6 @@"inactive": "Неактивен","inbox.desc": "Сотрудничайте в одном рабочем пространстве и превращайте идеи в результат.","inbox.title": "Lobe AI",- "input.addAi": "Добавить сообщение от ИИ",- "input.addAiPrefillUnsupported": "Текущая модель не поддерживает завершение разговора сообщением ассистента. Добавьте сообщение пользователя перед отправкой.",- "input.addUser": "Добавить сообщение пользователя","input.agentModeUnsupportedModel": "Текущая модель не поддерживает вызов инструментов агента. Переключитесь на модель с возможностями агента для лучшего опыта.","input.agentSlugMoved": "Эта ссылка теперь открывает другого агента. Переключаемся на него — попробуйте снова, как только он откроется. Ваш черновик сохранен.","input.agentSlugUnconfirmed": "Не удалось подтвердить, какого агента открывает эта ссылка. Проверьте подключение, затем попробуйте снова.",diff --git a/locales/ru-RU/hotkey.json b/locales/ru-RU/hotkey.jsonindex 4b3840a5817..7783639838b 100644--- a/locales/ru-RU/hotkey.json+++ b/locales/ru-RU/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Добавить текущий ввод как сообщение пользователя без запуска генерации",- "addUserMessage.title": "Добавить сообщение пользователя","commandPalette.desc": "Открыть глобальную палитру команд для быстрого доступа к функциям","commandPalette.title": "Палитра команд","deleteAndRegenerateMessage.desc": "Удалить последнее сообщение и сгенерировать заново",diff --git a/locales/tr-TR/chat.json b/locales/tr-TR/chat.jsonindex 7b7e44b09b5..be91f5c58d3 100644--- a/locales/tr-TR/chat.json+++ b/locales/tr-TR/chat.json@@ -1648,9 +1648,6 @@"inactive": "Pasif","inbox.desc": "Tek bir Çalışma Alanında iş birliği yapın ve fikirleri sonuca dönüştürün.","inbox.title": "Lobe AI",- "input.addAi": "Yapay Zeka mesajı ekle",- "input.addAiPrefillUnsupported": "Mevcut model, bir asistan mesajıyla konuşmayı sonlandırmayı desteklemiyor. Göndermeden önce bir kullanıcı mesajı ekleyin.",- "input.addUser": "Kullanıcı mesajı ekle","input.agentModeUnsupportedModel": "Mevcut model, araç çağırma yeteneğini desteklemiyor. En iyi deneyim için yetenekli bir modele geçin.","input.agentSlugMoved": "Bu bağlantı artık farklı bir ajanı açıyor. Ona geçiliyor — açıldıktan sonra tekrar deneyin. Taslağınız kaydedildi.","input.agentSlugUnconfirmed": "Bu bağlantının hangi ajanı açtığını doğrulayamadık. Bağlantınızı kontrol edin ve tekrar deneyin.",diff --git a/locales/tr-TR/hotkey.json b/locales/tr-TR/hotkey.jsonindex add07cc797f..d3f7a770b52 100644--- a/locales/tr-TR/hotkey.json+++ b/locales/tr-TR/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Mevcut girdiyi kullanıcı mesajı olarak ekle, ancak oluşturmayı tetikleme",- "addUserMessage.title": "Kullanıcı Mesajı Ekle","commandPalette.desc": "Özelliklere hızlı erişim için genel komut paletini aç","commandPalette.title": "Komut Paleti","deleteAndRegenerateMessage.desc": "Son mesajı sil ve yeniden oluştur",diff --git a/locales/vi-VN/chat.json b/locales/vi-VN/chat.jsonindex b80ab430607..4302772026c 100644--- a/locales/vi-VN/chat.json+++ b/locales/vi-VN/chat.json@@ -1646,9 +1646,6 @@"inactive": "Không hoạt động","inbox.desc": "Cộng tác trong một không gian làm việc và biến ý tưởng thành kết quả.","inbox.title": "Lobe AI",- "input.addAi": "Thêm tin nhắn AI",- "input.addAiPrefillUnsupported": "Mô hình hiện tại không hỗ trợ kết thúc cuộc trò chuyện bằng tin nhắn của trợ lý. Hãy tiếp tục bằng một tin nhắn của người dùng trước khi gửi.",- "input.addUser": "Thêm tin nhắn người dùng","input.agentModeUnsupportedModel": "Mô hình hiện tại không hỗ trợ gọi công cụ tác nhân. Hãy chuyển sang mô hình có khả năng tác nhân để có trải nghiệm tốt nhất.","input.agentSlugMoved": "Liên kết này bây giờ mở một agent khác. Đang chuyển sang nó — hãy thử lại sau khi nó mở. Bản nháp của bạn đã được giữ lại.","input.agentSlugUnconfirmed": "Không thể xác nhận liên kết này mở agent nào. Kiểm tra kết nối của bạn, sau đó thử lại.",diff --git a/locales/vi-VN/hotkey.json b/locales/vi-VN/hotkey.jsonindex b54c122ad80..5c4395ea3b4 100644--- a/locales/vi-VN/hotkey.json+++ b/locales/vi-VN/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "Thêm nội dung hiện tại dưới dạng tin nhắn người dùng mà không kích hoạt tạo phản hồi",- "addUserMessage.title": "Thêm Tin Nhắn Người Dùng","commandPalette.desc": "Mở bảng lệnh toàn cục để truy cập nhanh các tính năng","commandPalette.title": "Bảng Lệnh","deleteAndRegenerateMessage.desc": "Xóa tin nhắn cuối cùng và tạo lại",diff --git a/locales/zh-CN/chat.json b/locales/zh-CN/chat.jsonindex acc77088610..9344d26b8cc 100644--- a/locales/zh-CN/chat.json+++ b/locales/zh-CN/chat.json@@ -1693,9 +1693,6 @@"inactive": "不活跃","inbox.desc": "在同一工作区协作,把想法推进成结果","inbox.title": "Lobe AI",- "input.addAi": "添加一条助理消息",- "input.addAiPrefillUnsupported": "当前模型不支持以助理消息结尾发送,请在其后继续添加一条用户消息再发送。",- "input.addUser": "添加一条用户消息","input.agentModeUnsupportedModel": "当前模型不支持 Agentic 工具调用,建议切换为具备 Agent 能力的模型以获得最佳体验。","input.agentRunFeeUnfunded.desc": "每次助理运行都会收取运行费,使用自己的 API Key 也不例外。充值或升级套餐后再发送。","input.agentRunFeeUnfunded.descOverflow": "每次助理运行都会收取运行费,使用自己的 API Key 也不例外。你的余额足够支付,使用余额后再发送。",diff --git a/locales/zh-CN/hotkey.json b/locales/zh-CN/hotkey.jsonindex 097c00e2d36..30ddda272b6 100644--- a/locales/zh-CN/hotkey.json+++ b/locales/zh-CN/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "将当前输入内容添加为用户消息,但不触发生成",- "addUserMessage.title": "添加一条用户消息","commandPalette.desc": "打开全局命令面板快速访问功能","commandPalette.title": "命令面板","deleteAndRegenerateMessage.desc": "删除最后一条消息并重新生成",diff --git a/locales/zh-CN/setting.json b/locales/zh-CN/setting.jsonindex 70f7e411c4e..fe69535cb8c 100644--- a/locales/zh-CN/setting.json+++ b/locales/zh-CN/setting.json@@ -1178,8 +1178,8 @@"hotkey.invalidCombination": "快捷键需要至少包含一个修饰键 (Ctrl, Alt, Shift) 和一个常规键","hotkey.record": "按下按键以录制快捷键","hotkey.reset": "重置为默认快捷键",- "hotkey.sendKey.desc": "另一种组合用于换行",- "hotkey.sendKey.title": "发送消息",+ "hotkey.sendMessage.desc": "另一种组合键用于换行",+ "hotkey.sendMessage.title": "发送消息","hotkey.title": "快捷键","hotkey.updateError": "快捷键更新失败:网络或系统错误","hotkey.updateSuccess": "快捷键更新成功",diff --git a/locales/zh-TW/chat.json b/locales/zh-TW/chat.jsonindex 3c5e41a8e09..579d2c987fa 100644--- a/locales/zh-TW/chat.json+++ b/locales/zh-TW/chat.json@@ -1649,9 +1649,6 @@"inactive": "不活躍","inbox.desc": "開啟大腦集群,激發思維火花。你的智能助理,在這裡與你交流一切","inbox.title": "Lobe AI",- "input.addAi": "新增一條 AI 訊息",- "input.addAiPrefillUnsupported": "目前的模型不支援以助理訊息結束對話。請在發送前添加使用者訊息。",- "input.addUser": "新增一條使用者訊息","input.agentModeUnsupportedModel": "當前模型不支援代理工具調用。請切換到具有代理功能的模型以獲得最佳體驗。","input.agentSlugMoved": "此連結現在開啟的是不同的 Agent。正在切換到它 — 開啟後請再試一次。您的草稿已被保留。","input.agentSlugUnconfirmed": "無法確認此連結開啟的是哪個 Agent。請檢查您的連線,然後再試一次。",diff --git a/locales/zh-TW/hotkey.json b/locales/zh-TW/hotkey.jsonindex a57b821803b..0c0677ffbd2 100644--- a/locales/zh-TW/hotkey.json+++ b/locales/zh-TW/hotkey.json@@ -1,6 +1,4 @@{- "addUserMessage.desc": "將當前輸入內容添加為使用者消息,但不觸發生成",- "addUserMessage.title": "添加一條使用者消息","commandPalette.desc": "開啟全域指令面板以快速存取功能","commandPalette.title": "指令面板","deleteAndRegenerateMessage.desc": "刪除最後一則訊息並重新產生",diff --git a/packages/const/src/hotkeys.ts b/packages/const/src/hotkeys.tsindex 069af8af863..0411c2c0812 100644--- a/packages/const/src/hotkeys.ts+++ b/packages/const/src/hotkeys.ts@@ -42,7 +42,6 @@ export const KeyEnum = {} as const;export const HotkeyEnum = {- AddUserMessage: 'addUserMessage',CommandPalette: 'commandPalette',DeleteAndRegenerateMessage: 'deleteAndRegenerateMessage',DeleteLastMessage: 'deleteLastMessage',@@ -207,12 +206,6 @@ export const HOTKEYS_REGISTRATION: HotkeyRegistration = [keys: combineKeys([KeyEnum.Alt, 'n']),scopes: [HotkeyScopeEnum.Chat],},- {- group: HotkeyGroupEnum.Conversation,- id: HotkeyEnum.AddUserMessage,- keys: combineKeys([KeyEnum.Alt, KeyEnum.Enter]),- scopes: [HotkeyScopeEnum.Chat],- },{group: HotkeyGroupEnum.Conversation,id: HotkeyEnum.EditMessage,diff --git a/packages/locales/src/default/chat.ts b/packages/locales/src/default/chat.tsindex e927c6f01cf..97cd403361b 100644--- a/packages/locales/src/default/chat.ts+++ b/packages/locales/src/default/chat.ts@@ -1009,10 +1009,6 @@ export default {'inactive': 'Inactive','inbox.desc': 'Collaborate in one Workspace and move ideas into outcomes.','inbox.title': 'Lobe AI',- 'input.addAi': 'Add an AI message',- 'input.addAiPrefillUnsupported':- 'The current model doesn’t support ending the conversation with an assistant message. Follow it with a user message before sending.',- 'input.addUser': 'Add a user message','input.agentModeUnsupportedModel':'The current model doesn’t support agentic tool calling. Switch to a model with agent capability for the best experience.','input.agentRunFeeUnfunded.desc':diff --git a/packages/locales/src/default/hotkey.ts b/packages/locales/src/default/hotkey.tsindex 50201f71be2..a6184a0905d 100644--- a/packages/locales/src/default/hotkey.ts+++ b/packages/locales/src/default/hotkey.ts@@ -1,6 +1,4 @@export default {- 'addUserMessage.desc': 'Add the current input as a user message without triggering generation',- 'addUserMessage.title': 'Add a User Message','commandPalette.desc': 'Open the global command palette for quick access to features','commandPalette.title': 'Command Palette','deleteAndRegenerateMessage.desc': 'Delete the last message and regenerate',diff --git a/packages/locales/src/default/setting.ts b/packages/locales/src/default/setting.tsindex 59d701505f8..b1868a9142c 100644--- a/packages/locales/src/default/setting.ts+++ b/packages/locales/src/default/setting.ts@@ -1070,8 +1070,8 @@ export default {'The hotkey must include at least one modifier key (Ctrl, Alt, Shift) and one regular key','hotkey.record': 'Press a key to record the hotkey','hotkey.reset': 'Reset to default hotkeys',- 'hotkey.sendKey.desc': 'The other combination inserts a new line',- 'hotkey.sendKey.title': 'Send message',+ 'hotkey.sendMessage.desc': 'The other key combination inserts a line break',+ 'hotkey.sendMessage.title': 'Send Message','hotkey.title': 'Hotkeys','hotkey.updateError': 'Failed to update hotkey: Network or system error','hotkey.updateSuccess': 'Hotkey updated successfully',diff --git a/packages/types/src/hotkey.ts b/packages/types/src/hotkey.tsindex 53ac85347c2..96aca10a2a5 100644--- a/packages/types/src/hotkey.ts+++ b/packages/types/src/hotkey.ts@@ -1,5 +1,4 @@export type HotkeyId =- | 'addUserMessage'| 'commandPalette'| 'deleteAndRegenerateMessage'| 'deleteLastMessage'diff --git a/src/features/ChatInput/InputEditor/index.test.tsx b/src/features/ChatInput/InputEditor/index.test.tsxindex 37c0b01df39..0cbf8d654c2 100644--- a/src/features/ChatInput/InputEditor/index.test.tsx+++ b/src/features/ChatInput/InputEditor/index.test.tsx@@ -94,10 +94,6 @@ vi.mock('@lobechat/const', () => ({isDesktop: false,TRACING_SCENARIOS: { InputCompletion: 'input_completion' },}));-vi.mock('@lobechat/const/hotkeys', () => ({- HotkeyEnum: { AddUserMessage: 'add-user-message' },- KeyEnum: { Alt: 'alt', Enter: 'enter' },-}));vi.mock('@lobechat/heterogeneous-agents', () => ({ HETEROGENEOUS_TYPE_LABELS: {} }));vi.mock('@lobechat/prompts', () => ({chainInputCompletion: mocks.chainInputCompletion,@@ -143,12 +139,6 @@ vi.mock('fuse.js', () => ({},}));vi.mock('lexical', () => ({ KEY_ESCAPE_COMMAND: 'escape' }));-vi.mock('react-hotkeys-hook', () => ({- useHotkeysContext: () => ({- disableScope: vi.fn(),- enableScope: vi.fn(),- }),-}));vi.mock('@/components/DragUploadZone', () => ({usePasteFile: vi.fn(),@@ -210,7 +200,6 @@ vi.mock('@/store/user', () => {return { useUserStore };});vi.mock('@/store/user/selectors', () => ({- settingsSelectors: { getHotkeyById: () => () => 'alt+enter' },systemAgentSelectors: {inputCompletion: () => mocks.inputCompletionConfig,},diff --git a/src/features/ChatInput/InputEditor/index.tsx b/src/features/ChatInput/InputEditor/index.tsxindex 17e9578de23..2070708f8aa 100644--- a/src/features/ChatInput/InputEditor/index.tsx+++ b/src/features/ChatInput/InputEditor/index.tsx@@ -1,5 +1,4 @@import { isDesktop, TRACING_SCENARIOS } from '@lobechat/const';-import { HotkeyEnum, KeyEnum } from '@lobechat/const/hotkeys';import { HETEROGENEOUS_TYPE_LABELS } from '@lobechat/heterogeneous-agents';import {chainInputCompletion,@@ -12,12 +11,11 @@ import type { IEditor, ISlashMenuOption, ISlashSectionOption } from '@lobehub/edimport { INSERT_MENTION_COMMAND, ReactAutoCompletePlugin } from '@lobehub/editor';import { Editor, useEditorState } from '@lobehub/editor/react';// oxlint-disable-next-line stylex-migration/no-emotion-styles -- Lexical editor paragraphs take no className-import { combineKeys, createStaticStyles, cx } from '@lobehub/ui';+import { createStaticStyles, cx } from '@lobehub/ui';import * as stylex from '@stylexjs/stylex';import Fuse from 'fuse.js';import { KEY_ESCAPE_COMMAND } from 'lexical';import { memo, type ReactNode, useCallback, useEffect, useMemo, useRef } from 'react';-import { useHotkeysContext } from 'react-hotkeys-hook';import { useTranslation } from 'react-i18next';import { usePasteFile, useUploadFiles } from '@/components/DragUploadZone';@@ -36,7 +34,6 @@ import { useChatStore } from '@/store/chat';import { useServerConfigStore } from '@/store/serverConfig';import { useUserStore } from '@/store/user';import {- settingsSelectors,systemAgentSelectors,userGeneralSettingsSelectors,userProfileSelectors,@@ -133,9 +130,7 @@ const InputEditor = memo<{// view-level General access on the bound agent/group = full read-only input,// matching the workspace-viewer treatment (ChatInputNotice explains why).const { canUseResource } = useChatInputResourceAccess();- const hotkey = useUserStore(settingsSelectors.getHotkeyById(HotkeyEnum.AddUserMessage));const userId = useUserStore(userProfileSelectors.userId);- const { enableScope, disableScope } = useHotkeysContext();const agentId = useAgentId();const inputHistoryScope = useMemo(() => ({ agentId, userId }), [agentId, userId]);@@ -647,7 +642,6 @@ const InputEditor = memo<{onCompositionEnd={({ event }) => compositionProps.onCompositionEnd(event)}onInit={handleEditorInit}onBlur={() => {- disableScope(HotkeyEnum.AddUserMessage);saveDraftDebounced.flush();}}onChange={() => {@@ -678,9 +672,6 @@ const InputEditor = memo<{});}}}- onFocus={() => {- enableScope(HotkeyEnum.AddUserMessage);- }}onKeyDown={({ event }) => {if (inputHistory.handleKeyDown(event)) return true;}}@@ -693,8 +684,6 @@ const InputEditor = memo<{return true;}if (e.shiftKey || isComposingRef.current) return;- // when user like alt + enter to add ai message- if (e.altKey && hotkey === combineKeys([KeyEnum.Alt, KeyEnum.Enter])) return true;// In fullscreen mode, Enter inserts newline; only Cmd/Ctrl+Enter sendsif (expand) {if (isCommandPressed(e)) {diff --git a/src/features/Conversation/store/slices/message/action/index.test.ts b/src/features/Conversation/store/slices/message/action/index.test.tsindex 277ccbe97e4..3e9756db1cf 100644--- a/src/features/Conversation/store/slices/message/action/index.test.ts+++ b/src/features/Conversation/store/slices/message/action/index.test.ts@@ -1,6 +1,6 @@import { type UIChatMessage } from '@lobechat/types';import { act } from '@testing-library/react';-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { afterEach, describe, expect, it, vi } from 'vitest';import { useChatStore } from '@/store/chat';import { mcpAppContext } from '@/store/mcpApp/context';@@ -27,193 +27,6 @@ const createTestStore = (context?: Partial<ConversationContext>) =>},});-describe('message convenience actions', () => {- beforeEach(() => {- vi.clearAllMocks();- });-- afterEach(() => {- vi.restoreAllMocks();- });-- describe('addAIMessage', () => {- it('creates an assistant message with its conversation context and the submitted text', async () => {- const store = createTestStore();- const createMessage = vi.fn().mockResolvedValue('message-1');- store.setState({ createMessage });-- await act(async () => {- await store.getState().addAIMessage('assistant content');- });-- expect(createMessage).toHaveBeenCalledWith({- agentId: 'agent-1',- content: 'assistant content',- parentId: undefined,- role: 'assistant',- threadId: undefined,- topicId: 'topic-1',- });- });-- it('preserves the group scope when creating a message', async () => {- const store = createTestStore({ groupId: 'group-1', scope: 'group' });- const createMessage = vi.fn().mockResolvedValue('message-1');- store.setState({ createMessage });-- await act(async () => {- await store.getState().addAIMessage('assistant content');- });-- expect(createMessage).toHaveBeenCalledWith(expect.objectContaining({ groupId: 'group-1' }));- });-- it('still allows an empty assistant placeholder', async () => {- const store = createTestStore();- const createMessage = vi.fn().mockResolvedValue('message-1');- store.setState({ createMessage });-- await act(async () => {- await store.getState().addAIMessage('');- });-- expect(createMessage).toHaveBeenCalledWith(- expect.objectContaining({ content: '', role: 'assistant' }),- );- });-- it('uses the last display message as the parent id', async () => {- const store = createTestStore();- const createMessage = vi.fn().mockResolvedValue('message-1');- store.setState({- createMessage,- displayMessages: [- { id: 'prev-1', content: 'previous', role: 'user', createdAt: 1, updatedAt: 1 },- ],- });-- await act(async () => {- await store.getState().addAIMessage('assistant content');- });-- expect(createMessage).toHaveBeenCalledWith(expect.objectContaining({ parentId: 'prev-1' }));- });-- it('fires the onMessageCreated hook for the created assistant message', async () => {- const onMessageCreated = vi.fn();- const store = createTestStore();- const created: UIChatMessage = {- id: 'message-1',- content: 'assistant content',- role: 'assistant',- createdAt: 1,- updatedAt: 1,- };- store.setState({- createMessage: vi.fn().mockResolvedValue('message-1'),- displayMessages: [created],- hooks: { onMessageCreated },- });-- await act(async () => {- await store.getState().addAIMessage('assistant content');- });-- expect(onMessageCreated).toHaveBeenCalledWith(created);- });-- it('clears the input after successful creation', async () => {- const store = createTestStore();- store.setState({- createMessage: vi.fn().mockResolvedValue('message-1'),- inputMessage: 'submitted draft',- });-- await act(async () => {- await store.getState().addAIMessage('submitted draft');- });-- expect(store.getState().inputMessage).toBe('');- });-- it('does not clear the input when creation fails', async () => {- const store = createTestStore();- store.setState({- createMessage: vi.fn().mockResolvedValue(undefined),- inputMessage: 'submitted draft',- });-- await act(async () => {- await store.getState().addAIMessage('submitted draft');- });-- expect(store.getState().inputMessage).toBe('submitted draft');- });- });-- describe('addUserMessage', () => {- it('creates a user message with its conversation context, files and the submitted text', async () => {- const store = createTestStore();- const createMessage = vi.fn().mockResolvedValue('message-1');- store.setState({ createMessage });-- await act(async () => {- await store.getState().addUserMessage({ message: 'user content', fileList: ['file-1'] });- });-- expect(createMessage).toHaveBeenCalledWith({- agentId: 'agent-1',- content: 'user content',- files: ['file-1'],- parentId: undefined,- role: 'user',- threadId: undefined,- topicId: 'topic-1',- });- });-- it('preserves the group scope when creating a message', async () => {- const store = createTestStore({ groupId: 'group-1', scope: 'group' });- const createMessage = vi.fn().mockResolvedValue('message-1');- store.setState({ createMessage });-- await act(async () => {- await store.getState().addUserMessage({ message: 'user content' });- });-- expect(createMessage).toHaveBeenCalledWith(expect.objectContaining({ groupId: 'group-1' }));- });-- it('clears the input after successful creation', async () => {- const store = createTestStore();- store.setState({- createMessage: vi.fn().mockResolvedValue('message-1'),- inputMessage: 'submitted draft',- });-- await act(async () => {- await store.getState().addUserMessage({ message: 'submitted draft' });- });-- expect(store.getState().inputMessage).toBe('');- });-- it('does not clear the input when creation fails', async () => {- const store = createTestStore();- store.setState({- createMessage: vi.fn().mockResolvedValue(undefined),- inputMessage: 'submitted draft',- });-- await act(async () => {- await store.getState().addUserMessage({ message: 'submitted draft' });- });-- expect(store.getState().inputMessage).toBe('submitted draft');- });- });-});-describe('sendMessage composer ownership', () => {afterEach(() => {vi.restoreAllMocks();diff --git a/src/features/Conversation/store/slices/message/action/index.ts b/src/features/Conversation/store/slices/message/action/index.tsindex 9fce29c1fc4..8df72e4052e 100644--- a/src/features/Conversation/store/slices/message/action/index.ts+++ b/src/features/Conversation/store/slices/message/action/index.ts@@ -1,12 +1,6 @@-import { shouldDropUnsupportedClaudeAssistantPrefill } from '@lobechat/model-runtime/providers/anthropic/modelId';-import { toast } from '@lobehub/ui';-import { t } from 'i18next';import type { StateCreator } from 'zustand';-import { getEffectiveConversationModel } from '@/features/Conversation/store/utils/effectiveModel';-import type { Store as ConversationStore } from '../../../action';-import { isSameConversationContext } from '../../../utils/contextGuard';import { type MessageCRUDAction, messageCRUDSlice } from './crud';import { type MessageReactionAction, messageReactionSlice } from './reaction';import { sendMessage } from './sendMessage';@@ -24,16 +18,6 @@ import { messageStateSlice } from './state';*/export interface MessageActionextends MessageCRUDAction, MessageReactionAction, MessageStateAction {- /**- * Add an AI message (convenience method)- */- addAIMessage: (content: string) => Promise<string | undefined>;-- /**- * Add a user message (convenience method)- */- addUserMessage: (params: { fileList?: string[]; message: string }) => Promise<string | undefined>;-/*** Send a message in this conversation (unified Main + Thread)*/@@ -55,90 +39,6 @@ export const messageSlice: StateCreator<// Spread state actions...messageStateSlice(set, get, ...rest),- // Convenience methods- addAIMessage: async (content: string) => {- const state = get();- const { context, hooks } = state;- const { agentId, groupId, topicId, threadId } = context;-- // Get parent message ID- const displayMessages = state.displayMessages;- const parentId = displayMessages.length > 0 ? displayMessages.at(-1)?.id : undefined;-- const id = await state.createMessage({- agentId,- ...(groupId ? { groupId } : {}),- content,- parentId,- role: 'assistant',- threadId: threadId ?? undefined,- topicId: topicId ?? undefined,- });- if (!isSameConversationContext(context, get().context)) return undefined;-- if (id) {- // ===== Hook: onMessageCreated =====- if (hooks.onMessageCreated) {- const message = state.displayMessages.find((m) => m.id === id);- if (message) {- hooks.onMessageCreated(message);- }- }-- // Clear input after successful creation- set({ inputMessage: '' });-- // Claude 4.6+/5 reject conversations ending with an assistant turn- // (assistant prefill removed upstream), and the runtime strips trailing- // assistant messages for them. Adding mid-conversation stays legal, so- // don't block — just tell the user to follow up with a user message.- // Effective model = topic override > agent default (see helper JSDoc).- const model = getEffectiveConversationModel({ agentId, topicId });- if (model && shouldDropUnsupportedClaudeAssistantPrefill(model)) {- toast.info(t('input.addAiPrefillUnsupported', { ns: 'chat' }));- }- }-- return id;- },-- addUserMessage: async ({ message, fileList }) => {- const state = get();- const { context, hooks } = state;- const { agentId, groupId, topicId, threadId } = context;-- // Get parent message ID- const displayMessages = state.displayMessages;- const parentId = displayMessages.length > 0 ? displayMessages.at(-1)?.id : undefined;-- const id = await state.createMessage({- agentId,- ...(groupId ? { groupId } : {}),- content: message,- files: fileList,- parentId,- role: 'user',- threadId: threadId ?? undefined,- topicId: topicId ?? undefined,- });- if (!isSameConversationContext(context, get().context)) return undefined;-- if (id) {- // ===== Hook: onMessageCreated =====- if (hooks.onMessageCreated) {- const createdMessage = state.displayMessages.find((m) => m.id === id);- if (createdMessage) {- hooks.onMessageCreated(createdMessage);- }- }-- // Clear input after successful creation- set({ inputMessage: '' });- }-- return id;- },-// Send messagesendMessage: sendMessage(set, get),});diff --git a/src/features/Settings/hotkey/features/Conversation.tsx b/src/features/Settings/hotkey/features/Conversation.tsxindex 130b5a737ed..bb97523a747 100644--- a/src/features/Settings/hotkey/features/Conversation.tsx+++ b/src/features/Settings/hotkey/features/Conversation.tsx@@ -1,11 +1,11 @@'use client';import { HotkeyGroupEnum, KeyEnum } from '@lobechat/const/hotkeys';-import { combineKeys, Hotkey, HotkeyInput, Select } from '@lobehub/ui';+import { combineKeys, Flexbox, Hotkey, HotkeyInput, Select } from '@lobehub/ui';import { Form, type FormGroupItem, useForm } from '@lobehub/ui/form';import isEqual from 'fast-deep-equal';import { memo } from 'react';-import { useTranslation } from 'react-i18next';+import { Trans, useTranslation } from 'react-i18next';import AutoSaveHint from '@/components/Editor/AutoSaveHint';import { ConversationHotkeysSkeleton } from '@/components/Skeleton/Settings/tabs/Hotkey';@@ -14,18 +14,40 @@ import { FORM_STYLE } from '@/const/layoutTokens';import { SettingsSearchAnchor } from '@/features/SettingsSearch/anchor';import { useSaveState } from '@/hooks/useSaveState';import { useUserStore } from '@/store/user';-import { preferenceSelectors, settingsSelectors } from '@/store/user/selectors';+import { settingsSelectors } from '@/store/user/selectors';import { type HotkeyItem } from '@/types/hotkey';import { type UserHotkeyConfig } from '@/types/user/settings';+import { type SendKey, useSendKeyPreference } from './useSendKeyPreference';++const SendKeyLabel = memo<{ sendKey: SendKey }>(({ sendKey }) => (+ <Flexbox horizontal align={'center'} as={'span'} gap={4}>+ <Trans+ i18nKey={sendKey === 'enter' ? 'input.sendWithEnter' : 'input.sendWithCmdEnter'}+ ns={'chat'}+ components={{+ key: (+ <Hotkey+ as={'span'}+ keys={sendKey === 'enter' ? KeyEnum.Enter : combineKeys([KeyEnum.Mod, KeyEnum.Enter])}+ variant={'borderless'}+ />+ ),+ }}+ />+ </Flexbox>+));++const SEND_KEY_OPTIONS = (['enter', 'modEnter'] as const).map((sendKey) => ({+ label: <SendKeyLabel sendKey={sendKey} />,+ value: sendKey,+}));+const HotkeySetting = memo(() => {- const { t } = useTranslation(['setting', 'hotkey']);+ const { t } = useTranslation(['setting', 'hotkey', 'chat']);const { hotkey } = useUserStore(settingsSelectors.currentSettings, isEqual);const [setSettings, isUserStateInit] = useUserStore((s) => [s.setSettings, s.isUserStateInit]);- const [useCmdEnterToSend, updatePreference] = useUserStore((s) => [- preferenceSelectors.useCmdEnterToSend(s),- s.updatePreference,- ]);+ const { sendKey, setSendKey } = useSendKeyPreference();const { status: saveStatus, lastSavedAt, save, retry } = useSaveState();const form = useForm({initialValues: hotkey,@@ -67,33 +89,22 @@ const HotkeySetting = memo(() => {};};- /**- * The send key is a user preference (`useCmdEnterToSend`), not a hotkey binding, so- * this row has no form `name` and saves through `updatePreference` on its own.- */+ // Stored in user preference rather than the hotkey map, so it is a controlled+ // field outside the hotkey form values.const sendKeyItem = {children: (<Select+ aria-label={t('hotkey.sendMessage.title')}+ options={SEND_KEY_OPTIONS}style={{ minWidth: 160 }}- value={useCmdEnterToSend ? 'cmdEnter' : 'enter'}- options={[- { label: <Hotkey keys={KeyEnum.Enter} variant={'borderless'} />, value: 'enter' },- {- label: (- <Hotkey keys={combineKeys([KeyEnum.Mod, KeyEnum.Enter])} variant={'borderless'} />- ),- value: 'cmdEnter',- },- ]}- onChange={(value) =>- save(() => updatePreference({ useCmdEnterToSend: value === 'cmdEnter' }))- }+ value={sendKey}+ onChange={(value: SendKey) => save(() => setSendKey(value))}/>),- desc: t('hotkey.sendKey.desc'),+ desc: t('hotkey.sendMessage.desc'),label: (- <SettingsSearchAnchor id={'hotkey-send-key'}>- {t('hotkey.sendKey.title')}+ <SettingsSearchAnchor id={'hotkey-send-message'}>+ {t('hotkey.sendMessage.title')}</SettingsSearchAnchor>),};diff --git a/src/features/Settings/hotkey/features/useSendKeyPreference.test.ts b/src/features/Settings/hotkey/features/useSendKeyPreference.test.tsnew file mode 100644index 00000000000..899dac4ec55--- /dev/null+++ b/src/features/Settings/hotkey/features/useSendKeyPreference.test.ts@@ -0,0 +1,48 @@+/**+ * @vitest-environment happy-dom+ */+import { renderHook } from '@testing-library/react';+import { beforeEach, describe, expect, it, vi } from 'vitest';++import { useSendKeyPreference } from './useSendKeyPreference';++const mocks = vi.hoisted(() => ({+ preference: {} as { useCmdEnterToSend?: boolean },+ updatePreference: vi.fn(),+}));++vi.mock('@/store/user', () => ({+ useUserStore: (selector: (state: Record<string, unknown>) => unknown) =>+ selector({ preference: mocks.preference, updatePreference: mocks.updatePreference }),+}));++describe('useSendKeyPreference', () => {+ beforeEach(() => {+ vi.clearAllMocks();+ mocks.preference = {};+ });++ it('defaults to Enter when the preference was never set', () => {+ const { result } = renderHook(() => useSendKeyPreference());++ expect(result.current.sendKey).toBe('enter');+ });++ it('reflects a saved Cmd/Ctrl+Enter preference', () => {+ mocks.preference = { useCmdEnterToSend: true };+ const { result } = renderHook(() => useSendKeyPreference());++ expect(result.current.sendKey).toBe('modEnter');+ });++ it.each([+ ['modEnter', true],+ ['enter', false],+ ] as const)('saves %s as useCmdEnterToSend=%s', (sendKey, expected) => {+ const { result } = renderHook(() => useSendKeyPreference());++ result.current.setSendKey(sendKey);++ expect(mocks.updatePreference).toHaveBeenCalledWith({ useCmdEnterToSend: expected });+ });+});diff --git a/src/features/Settings/hotkey/features/useSendKeyPreference.ts b/src/features/Settings/hotkey/features/useSendKeyPreference.tsnew file mode 100644index 00000000000..2739c608df7--- /dev/null+++ b/src/features/Settings/hotkey/features/useSendKeyPreference.ts@@ -0,0 +1,24 @@+import { useCallback } from 'react';++import { useUserStore } from '@/store/user';+import { preferenceSelectors } from '@/store/user/selectors';++export type SendKey = 'enter' | 'modEnter';++/**+ * Bridges the chat send-key choice (Enter vs Cmd/Ctrl+Enter) to the+ * `useCmdEnterToSend` user preference.+ */+export const useSendKeyPreference = () => {+ const useCmdEnterToSend = useUserStore(preferenceSelectors.useCmdEnterToSend);+ const updatePreference = useUserStore((s) => s.updatePreference);++ const sendKey: SendKey = useCmdEnterToSend ? 'modEnter' : 'enter';++ const setSendKey = useCallback(+ (next: SendKey) => updatePreference({ useCmdEnterToSend: next === 'modEnter' }),+ [updatePreference],+ );++ return { sendKey, setSendKey };+};diff --git a/src/features/SettingsSearch/items.ts b/src/features/SettingsSearch/items.tsindex 627b34422e5..2d3ad33732e 100644--- a/src/features/SettingsSearch/items.ts+++ b/src/features/SettingsSearch/items.ts@@ -638,16 +638,16 @@ export const SETTINGS_SEARCH_ITEMS: SettingsSearchItem[] = [tab: SettingsTabs.Hotkey,},{- anchor: 'hotkey-conversation',- keywords: ['shortcut', 'keyboard', 'chat'],- labelKey: 'hotkey.group.conversation',+ anchor: 'hotkey-send-message',+ descKey: 'hotkey.sendMessage.desc',+ keywords: ['send', 'enter', 'cmd enter', 'ctrl enter', 'newline', 'line break', 'shortcut'],+ labelKey: 'hotkey.sendMessage.title',tab: SettingsTabs.Hotkey,},{- anchor: 'hotkey-send-key',- descKey: 'hotkey.sendKey.desc',- keywords: ['send', 'enter', 'cmd', 'ctrl', 'newline'],- labelKey: 'hotkey.sendKey.title',+ anchor: 'hotkey-conversation',+ keywords: ['shortcut', 'keyboard', 'chat'],+ labelKey: 'hotkey.group.conversation',tab: SettingsTabs.Hotkey,},{diff --git a/src/hooks/useHotkeys/chatScope.ts b/src/hooks/useHotkeys/chatScope.tsindex 681e561e05d..83e06244bd2 100644--- a/src/hooks/useHotkeys/chatScope.ts+++ b/src/hooks/useHotkeys/chatScope.ts@@ -54,18 +54,6 @@ export const useFindInTopicHotkey = (enabled: boolean) => {// Note: useDeleteAndRegenerateMessageHotkey has been moved to ConversationStore// Note: useDeleteLastMessageHotkey has been moved to ConversationStore-export const useAddUserMessageHotkey = (send: () => void) => {- return useHotkeyById(- HotkeyEnum.AddUserMessage,- () => {- send();- },- {- enableOnContentEditable: true,- },- );-};-// Register aggregateexport const useRegisterChatHotkeys = () => {diff --git a/src/routes/(main)/agent/features/Conversation/MainChatInput/index.tsx b/src/routes/(main)/agent/features/Conversation/MainChatInput/index.tsxindex d14b57a1f37..c7483d74ea4 100644--- a/src/routes/(main)/agent/features/Conversation/MainChatInput/index.tsx+++ b/src/routes/(main)/agent/features/Conversation/MainChatInput/index.tsx@@ -11,7 +11,6 @@ import { agentByIdSelectors } from '@/store/agent/selectors';import { useChatStore } from '@/store/chat';import AgentConfigError from './AgentConfigError';-import { useAddUserMessageShortcut } from './useAddUserMessageShortcut';const contextWindowRightActions: ActionKeys[] = ['model', 'voiceMessage', 'contextWindow'];const promptTransformRightActions: ActionKeys[] = [@@ -20,6 +19,7 @@ const promptTransformRightActions: ActionKeys[] = ['voiceMessage','contextWindow',];+const sendButtonProps = { shape: 'round' } as const;/*** MainChatInput@@ -30,8 +30,6 @@ const promptTransformRightActions: ActionKeys[] = [* Only adds MessageFromUrl for desktop mode.*/const MainChatInput = memo(() => {- useAddUserMessageShortcut();-const agentId = useConversationStore(contextSelectors.agentId);const model = useAgentStore(agentByIdSelectors.getAgentModelById(agentId));const provider = useAgentStore(agentByIdSelectors.getAgentModelProviderById(agentId));@@ -53,7 +51,7 @@ const MainChatInput = memo(() => {isConfigLoading={isAgentConfigLoading}leftActions={leftActions}rightActions={rightActions}- sendButtonProps={{ shape: 'round' }}+ sendButtonProps={sendButtonProps}onEditorReady={(instance) => {// Sync to global ChatStore for compatibility with other featuresuseChatStore.setState({ mainInputEditor: instance });diff --git a/src/routes/(main)/agent/features/Conversation/MainChatInput/useAddUserMessageShortcut.ts b/src/routes/(main)/agent/features/Conversation/MainChatInput/useAddUserMessageShortcut.tsdeleted file mode 100644index 05534a35169..00000000000--- a/src/routes/(main)/agent/features/Conversation/MainChatInput/useAddUserMessageShortcut.ts+++ /dev/null@@ -1,27 +0,0 @@-'use client';--import { useCallback } from 'react';--import { useConversationStore, useConversationStoreApi } from '@/features/Conversation';-import { useAddUserMessageHotkey } from '@/hooks/useHotkeys';--/**- * Binds the "add user message" hotkey: appends the composer text as a user- * message without asking the agent to reply.- */-export const useAddUserMessageShortcut = () => {- const storeApi = useConversationStoreApi();- const editor = useConversationStore((s) => s.editor);-- const handleAddUserMessage = useCallback(() => {- const store = storeApi.getState();- const message = store.inputMessage;- if (!message.trim()) return;-- store.addUserMessage({ message });- editor?.clearContent();- editor?.focus();- }, [storeApi, editor]);-- useAddUserMessageHotkey(handleAddUserMessage);-};diff --git a/src/routes/(main)/group/features/Conversation/MainChatInput/index.tsx b/src/routes/(main)/group/features/Conversation/MainChatInput/index.tsxindex 75b15029a70..65a8556e418 100644--- a/src/routes/(main)/group/features/Conversation/MainChatInput/index.tsx+++ b/src/routes/(main)/group/features/Conversation/MainChatInput/index.tsx@@ -17,6 +17,7 @@ const leftActions: ActionKeys[] = [];const rightActions: ActionKeys[] = ['model', 'voiceMessage', 'contextWindow'];+const sendButtonProps = { shape: 'round' } as const;/*** MainChatInput@@ -32,7 +33,7 @@ const MainChatInput = memo(() => {skipScrollMarginWithListleftActions={leftActions}rightActions={rightActions}- sendButtonProps={{ shape: 'round' }}+ sendButtonProps={sendButtonProps}onEditorReady={(instance) => {// Sync to global ChatStore for compatibility with other featuresuseChatStore.setState({ mainInputEditor: instance });