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

View File

@ -352,9 +352,11 @@ onMounted(async () => {
class="mt-1" class="mt-1"
> >
<div <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="[ :class="[
conversation.id === activeConversationId ? 'bg-success' : '', conversation.id === activeConversationId
? 'bg-primary/10 dark:bg-primary/20'
: '',
]" ]"
> >
<div class="flex items-center"> <div class="flex items-center">
@ -371,7 +373,6 @@ onMounted(async () => {
</span> </span>
</div> </div>
<!-- TODO @AI目前选中的颜色有点丑好像是绿色看看怎么优化下 -->
<div <div
v-show="hoverConversationId === conversation.id" v-show="hoverConversationId === conversation.id"
class="relative right-0.5 flex items-center text-gray-400" class="relative right-0.5 flex items-center text-gray-400"