mirror of
https://gitee.com/yudaocode/yudao-ui-admin-vben.git
synced 2025-12-30 10:32:25 +00:00
feat:【antd】【ai】chat 的样式 review 修复
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
// TODO @gjd:https://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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user