【增加】AI Chat 角色仓库调用

This commit is contained in:
cherishsince 2024-05-16 09:34:53 +08:00
parent 1a56021e75
commit 25d346c201

View File

@ -50,7 +50,7 @@
</div>
<!-- 左底部工具栏 -->
<div class="tool-box">
<div>
<div @click="handleRoleRepository">
<Icon icon="ep:user" />
<el-text size="small">角色仓库</el-text>
</div>
@ -145,6 +145,10 @@
</div>
</div>
</div>
<!-- 角色仓库抽屉 -->
<el-drawer v-model="drawer" title="角色仓库" size="50%">
<Role />
</el-drawer>
</el-main>
<el-footer class="footer-container">
<form @submit.prevent="onSend" class="prompt-from">
@ -192,6 +196,7 @@
import { ChatMessageApi, ChatMessageSendVO, ChatMessageVO } from '@/api/ai/chat/message'
import { ChatConversationApi, ChatConversationVO } from '@/api/ai/chat/conversation'
import ChatConversationUpdateForm from './components/ChatConversationUpdateForm.vue'
import Role from '@/views/ai/chat/role/index.vue'
import { formatDate } from '@/utils/formatTime'
import { useClipboard } from '@vueuse/core'
// markdown
@ -218,6 +223,7 @@ const conversationList = ref([] as ChatConversationVO[])
// copy
const { copy } = useClipboard()
const drawer = ref<boolean>(false) //
const searchName = ref('') //
const inputTimeout = ref<any>() //
const conversationId = ref<number>(-1) //
@ -537,6 +543,11 @@ const handleConversationClick = async (id: number) => {
await messageList()
}
//
const handleRoleRepository = async () => {
drawer.value = !drawer.value
}
/** 初始化 **/
onMounted(async () => {
//
@ -669,6 +680,7 @@ onMounted(async () => {
color: #606266;
padding: 0;
margin: 0;
cursor: pointer;
> span {
margin-left: 5px;