feat:【antd】【ai】chat 的样式 review 修复

pull/264/head^2
YunaiV 2025-11-15 21:48:44 +08:00
parent a15511ee6b
commit a5d1ab75f8
2 changed files with 7 additions and 14 deletions

View File

@ -1,5 +1,4 @@
<script lang="ts" setup>
// TODO @gjdhttps://t.zsxq.com/pmNb1 AI
import type { AiChatConversationApi } from '#/api/ai/chat/conversation';
import type { AiChatMessageApi } from '#/api/ai/chat/message';
@ -101,8 +100,7 @@ async function handleConversationClick(
// message
await getMessageList();
//
// TODO @AI await
scrollToBottom(true);
await scrollToBottom(true);
prompt.value = '';
//
prompt.value = '';
@ -156,7 +154,7 @@ async function handleConversationCreateSuccess() {
//
prompt.value = '';
//
uploadFiles.value = []
uploadFiles.value = [];
}
// =========== ===========
@ -363,8 +361,7 @@ async function doSendMessageStream(userMessage: AiChatMessageApi.ChatMessage) {
await nextTick();
await scrollToBottom(); //
// 1.3
// TODO @AI await
textRoll();
textRoll().then();
// 2. event stream
let isFirstChunk = true; // chunk
@ -538,11 +535,6 @@ onMounted(async () => {
activeMessageListLoading.value = true;
await getMessageList();
});
// TODO @
// TODO @
// TODO @
// TODO @mcp
// TODO @
</script>
<template>

View File

@ -352,9 +352,11 @@ onMounted(async () => {
class="mt-1"
>
<div
class="mb-2 flex cursor-pointer flex-row items-center justify-between rounded-lg px-2 leading-10"
class="mb-2 flex cursor-pointer flex-row items-center justify-between rounded-lg px-2 leading-10 transition-colors hover:bg-gray-100 dark:hover:bg-gray-800"
:class="[
conversation.id === activeConversationId ? 'bg-success' : '',
conversation.id === activeConversationId
? 'bg-primary/10 dark:bg-primary/20'
: '',
]"
>
<div class="flex items-center">
@ -371,7 +373,6 @@ onMounted(async () => {
</span>
</div>
<!-- TODO @AI目前选中的颜色有点丑好像是绿色看看怎么优化下 -->
<div
v-show="hoverConversationId === conversation.id"
class="relative right-0.5 flex items-center text-gray-400"