Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
25d346c2
authored
May 16, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】AI Chat 角色仓库调用
parent
1a56021e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
+13
-1
src/views/ai/chat/index.vue
+13
-1
No files found.
src/views/ai/chat/index.vue
View file @
25d346c2
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment