From b81f31c6521d2c4bd860f6a031d6feeee1a75afe Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Thu, 15 May 2025 22:57:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BC=98=E5=8C=96=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=98=BE=E7=A4=BA=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/AgentChatComponent.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/web/src/components/AgentChatComponent.vue b/web/src/components/AgentChatComponent.vue index d3560e35..010dcd18 100644 --- a/web/src/components/AgentChatComponent.vue +++ b/web/src/components/AgentChatComponent.vue @@ -25,7 +25,9 @@
-
{{ currentChat?.title }}
+
+ {{ currentChat?.title }} +
@@ -304,6 +306,11 @@ const renameChat = async (data) => { return; } + // 最长 30个字符,自动截断 + if (title.length > 30) { + title = title.slice(0, 30); + } + try { // 调用API更新对话 await threadApi.updateThread(chatId, title); @@ -797,10 +804,17 @@ const mergeMessageChunk = (chunks) => { padding: 1rem; border-bottom: 1px solid var(--main-light-3); - .header__left, .header__right { + .header__left, .header__right, .header__center { display: flex; align-items: center; } + + .center-title { + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } .nav-btn {