💄 style: add switch portal thread (#4819)

* 💄 style: improve i18n

* 💄 style: add switch portal thread

* style: improve i18n
This commit is contained in:
Arvin Xu
2024-11-28 03:00:18 +08:00
committed by GitHub
parent b4093799ca
commit 8dbf3ce52f
21 changed files with 50 additions and 7 deletions
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} نسخة",
"emptyAgent": "لا يوجد مساعد",
"historyRange": "نطاق التاريخ",
"historySummary": "ملخص الرسائل التاريخية",
"inbox": {
"desc": "قم بتشغيل مجموعة الدماغ وأشعل شرارة التفكير. مساعدك الذكي، هنا حيث يمكنك التواصل بكل شيء",
"title": "دردشة عشوائية"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Копие",
"emptyAgent": "Няма наличен асистент",
"historyRange": "Диапазон на историята",
"historySummary": "Исторически обобщение на съобщения",
"inbox": {
"desc": "Активирай мозъчния клъстер и събуди креативното мислене. Твоят виртуален агент е тук, за да общува с теб за всичко.",
"title": "Просто чати"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Kopie",
"emptyAgent": "Kein Assistent verfügbar",
"historyRange": "Verlaufsbereich",
"historySummary": "Zusammenfassung historischer Nachrichten",
"inbox": {
"desc": "Aktiviere das Gehirncluster und entfache den Funken des Denkens. Dein intelligenter Assistent, der mit dir über alles kommuniziert.",
"title": "Lass uns plaudern"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Copy",
"emptyAgent": "No assistant available",
"historyRange": "History Range",
"historySummary": "Historical Message Summary",
"inbox": {
"desc": "Activate the brain cluster and spark creative thinking. Your virtual assistant is here to communicate with you about everything.",
"title": "Just Chat"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Copia",
"emptyAgent": "No hay asistente disponible",
"historyRange": "Rango de historial",
"historySummary": "Resumen de mensajes históricos",
"inbox": {
"desc": "Despierta la mente con el poder del cerebro colectivo. Tu asistente inteligente está aquí para conversar contigo sobre cualquier cosa.",
"title": "Charla casual"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "نسخه‌ای از {{title}}",
"emptyAgent": "دستیار موجود نیست",
"historyRange": "محدوده تاریخی",
"historySummary": "خلاصه پیام‌های تاریخی",
"inbox": {
"desc": "خوشه‌های مغزی را فعال کنید و جرقه‌های تفکر را برانگیزید. دستیار هوشمند شما اینجاست تا با شما در مورد هر چیزی صحبت کند.",
"title": "گپ دوستانه"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Copie",
"emptyAgent": "Aucun assistant disponible",
"historyRange": "Plage d'historique",
"historySummary": "Résumé des messages historiques",
"inbox": {
"desc": "Débloquez le potentiel de votre esprit. Votre agent intelligent est là pour discuter avec vous de tout et de rien.",
"title": "Discutons un peu"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Copia",
"emptyAgent": "Nessun assistente disponibile",
"historyRange": "Intervallo cronologico",
"historySummary": "Riepilogo della storia",
"inbox": {
"desc": "Attiva il cluster cerebrale, accendi la scintilla del pensiero. Il tuo assistente intelligente, qui per comunicare con te su tutto.",
"title": "Chiacchierata casuale"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} のコピー",
"emptyAgent": "エージェントがいません",
"historyRange": "履歴範囲",
"historySummary": "履歴メッセージの要約",
"inbox": {
"desc": "脳のクラスターを起動し、創造性を引き出しましょう。あなたのスマートアシスタントは、あなたとすべてのことについてここでコミュニケーションします。",
"title": "気軽におしゃべり"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} 복사본",
"emptyAgent": "도우미가 없습니다",
"historyRange": "대화 기록 범위",
"historySummary": "역사 메시지 요약",
"inbox": {
"desc": "뇌 클러스터를 활성화하여 창의적인 아이디어를 끌어내는 인공지능 비서입니다. 여기서 모든 것에 대해 대화합니다.",
"title": "무작위 대화"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Kopie",
"emptyAgent": "Geen assistent beschikbaar",
"historyRange": "Geschiedenisbereik",
"historySummary": "Geschiedenis samenvatting",
"inbox": {
"desc": "Activeer de hersencluster en laat de vonken van gedachten overslaan. Je slimme assistent, hier om met je over alles te praten.",
"title": "Praat maar raak"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} kopia",
"emptyAgent": "Brak asystenta",
"historyRange": "Zakres historii",
"historySummary": "Podsumowanie wiadomości historycznych",
"inbox": {
"desc": "Włącz klastry mózgów, rozpal iskrę myślenia. Twój inteligentny asystent, gotowy do rozmowy o wszystkim.",
"title": "Pogadajmy sobie"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Cópia",
"emptyAgent": "Sem assistente disponível",
"historyRange": "Intervalo de Histórico",
"historySummary": "Resumo das mensagens históricas",
"inbox": {
"desc": "Ative o cluster cerebral, inspire faíscas de pensamento. Seu assistente inteligente, aqui para conversar sobre tudo.",
"title": "Conversa Aleatória"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Копия",
"emptyAgent": "Нет ассистента",
"historyRange": "История сообщений",
"historySummary": "Сводка исторических сообщений",
"inbox": {
"desc": "Зажги искру мысли, открой кластер мозгов. Твой виртуальный ассистент, готовый обсудить все с тобой.",
"title": "Просто поболтаем"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Kopya",
"emptyAgent": "Asistan yok",
"historyRange": "Geçmiş Aralığı",
"historySummary": "Tarihsel haber özeti",
"inbox": {
"desc": "Beyin fırtınasını başlatın ve yaratıcı düşünmeye başlayın. Sanal asistanınız burada, her konuda sizinle iletişim kurmak için hazır.",
"title": "Sohbet Et"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} Bản sao",
"emptyAgent": "Không có trợ lý",
"historyRange": "Phạm vi lịch sử",
"historySummary": "Tóm tắt tin tức lịch sử",
"inbox": {
"desc": "Kích hoạt cụm não, khơi dậy tia lửa tư duy. Trợ lý thông minh của bạn, ở đây để trò chuyện với bạn về mọi thứ.",
"title": "Chuyện phiếm"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} 副本",
"emptyAgent": "暂无助手",
"historyRange": "历史范围",
"historySummary": "历史消息总结",
"inbox": {
"desc": "开启大脑集群,激发思维火花。你的智能助理,在这里与你交流一切",
"title": "随便聊聊"
+1
View File
@@ -32,6 +32,7 @@
"duplicateTitle": "{{title}} 副本",
"emptyAgent": "暫無助手",
"historyRange": "歷史範圍",
"historySummary": "歷史消息總結",
"inbox": {
"desc": "開啟大腦集群,激發思維火花。你的智能助理,在這裡與你交流一切",
"title": "隨便聊聊"
@@ -4,6 +4,7 @@ import { Typography } from 'antd';
import { createStyles } from 'antd-style';
import { ScrollText } from 'lucide-react';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Center, Flexbox } from 'react-layout-kit';
import { useChatStore } from '@/store/chat';
@@ -28,6 +29,7 @@ const useStyles = createStyles(({ css, token }) => ({
const History = memo(() => {
const { styles, theme } = useStyles();
const { t } = useTranslation('chat');
const [content, model] = useChatStore((s) => {
const history = topicSelectors.currentActiveTopicSummary(s);
return [history?.content, history?.model];
@@ -46,8 +48,7 @@ const History = memo(() => {
style={{ color: theme.colorTextDescription }}
/>
</Center>
<Typography.Text type={'secondary'}></Typography.Text>
<Typography.Text type={'secondary'}>{t('historySummary')}</Typography.Text>
{model && (
<div>
<ModelTag model={model} />
+28 -5
View File
@@ -1,20 +1,43 @@
import { ActionIcon } from '@lobehub/ui';
import { XIcon } from 'lucide-react';
import { ArrowLeftRight, XIcon } from 'lucide-react';
import { memo } from 'react';
import { Flexbox } from 'react-layout-kit';
import SidebarHeader from '@/components/SidebarHeader';
import { useChatStore } from '@/store/chat';
import Title from './Title';
const Header = () => {
const closeThreadPortal = useChatStore((s) => s.closeThreadPortal);
const Header = memo(() => {
const [hasPortal, portalThreadId, closeThreadPortal, switchThread] = useChatStore((s) => [
!!s.portalThreadId,
s.portalThreadId,
s.closeThreadPortal,
s.switchThread,
]);
return (
<SidebarHeader
actions={<ActionIcon icon={XIcon} onClick={closeThreadPortal} />}
actions={
<Flexbox horizontal>
{hasPortal && (
<ActionIcon
icon={ArrowLeftRight}
onClick={() => {
if (!portalThreadId) return;
switchThread(portalThreadId);
closeThreadPortal();
}}
/>
)}
<ActionIcon icon={XIcon} onClick={closeThreadPortal} />
</Flexbox>
}
style={{ paddingBlock: 8, paddingInline: 8 }}
title={<Title />}
/>
);
};
});
export default Header;
+1
View File
@@ -33,6 +33,7 @@ export default {
duplicateTitle: '{{title}} 副本',
emptyAgent: '暂无助手',
historyRange: '历史范围',
historySummary: '历史消息总结',
inbox: {
desc: '开启大脑集群,激发思维火花。你的智能助理,在这里与你交流一切',
title: '随便聊聊',