From 779b42c65391c2f4f4385e3ebf8a0abae74a0ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 26 May 2026 13:54:35 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20!pr850=20?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81=E7=94=A8=E6=B3=95=E4=B8=8E?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/chat/index.vue | 30 ++++++++++++------ src/views/ai/chat/modules/chat-input.vue | 6 ++-- src/views/ai/chat/modules/chat-main.vue | 36 +++++++++++----------- src/views/ai/chat/modules/chat-sidebar.vue | 18 +++++------ 4 files changed, 51 insertions(+), 39 deletions(-) diff --git a/src/views/ai/chat/index.vue b/src/views/ai/chat/index.vue index d01f690..e4ad028 100644 --- a/src/views/ai/chat/index.vue +++ b/src/views/ai/chat/index.vue @@ -93,6 +93,14 @@ async function onSelectAgent(agent: AgentItem) { await loadConversations(agent.id); } +async function handleNewChat() { + if (!currentAgent.value && agents.value.length) { + currentAgent.value = agents.value[0]; + await loadConversations(currentAgent.value.id); + } + currentConversationId.value = ''; +} + async function onDeleteConversation(conversationId: string) { if (!currentAgent.value) return; try { @@ -140,7 +148,7 @@ onMounted(() => { @select-agent="onSelectAgent" @select-conversation="currentConversationId = $event" @delete-conversation="onDeleteConversation" - @new-chat="currentConversationId = ''" + @new-chat="handleNewChat" /> { .ai-chat-page { display: flex; flex-direction: column; - height: calc(100vh - 84px); + height: calc(100vh - 123px); min-height: 0; background: var(--el-bg-color-page); + border-radius: var(--app-radius-base); overflow: hidden; } .chat-header { - height: 46px; - padding: 0 14px; + flex: 0 0 38px; + height: 38px; + padding: 0 12px; border-bottom: 1px solid var(--app-surface-border); + border-top-left-radius: var(--app-radius-base); + border-top-right-radius: var(--app-radius-base); background: var(--app-surface-bg); display: flex; align-items: center; @@ -175,14 +187,14 @@ onMounted(() => { align-items: center; gap: 8px; color: var(--app-text-title); - font-size: 18px; + font-size: 16px; font-weight: 600; } .brand-dot { - width: 16px; - height: 16px; - border-radius: 50%; + width: 12px; + height: 12px; + border-radius: var(--app-radius-sm); background: var(--el-color-primary); } @@ -195,7 +207,7 @@ onMounted(() => { @media (max-width: 768px) { .ai-chat-page { - height: calc(100vh - 64px); + height: calc(100vh - 88px); } .chat-body { diff --git a/src/views/ai/chat/modules/chat-input.vue b/src/views/ai/chat/modules/chat-input.vue index a4bb29a..b39f053 100644 --- a/src/views/ai/chat/modules/chat-input.vue +++ b/src/views/ai/chat/modules/chat-input.vue @@ -39,16 +39,16 @@ function submit() {