mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 04:46:26 +00:00
refactor(chat): extract chat page into separate components
将AI聊天页面拆分为独立的组件模块,包括侧边栏、导航栏、消息列表和输入框,提升代码可维护性
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, watch } from "vue";
|
||||
import WelcomeScreen from "./FaWelcomeScreen.vue";
|
||||
import FaMessageItem from "./FaMessageItem.vue";
|
||||
import type { ChatMessage } from "../types";
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -55,6 +55,10 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import AiChatAPI, { ChatSession } from "@/api/module_ai/chat";
|
||||
import { Auth } from "@utils/auth";
|
||||
import type { ChatMessage, UploadedFile } from "./types";
|
||||
import FaSidebar from "./components/FaSidebar.vue";
|
||||
import FaChatNavbar from "./components/FaChatNavbar.vue";
|
||||
import FaChatMessages from "./components/FaChatMessages.vue";
|
||||
import FaChatInput from "./components/FaChatInput.vue";
|
||||
|
||||
// 状态
|
||||
const messages = ref<ChatMessage[]>([]);
|
||||
|
||||
Reference in New Issue
Block a user