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
f6f786f1
authored
May 17, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】AI 聊天发送,判断是否存在对话
parent
1a1e53ae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
src/views/ai/chat/index.vue
+7
-15
No files found.
src/views/ai/chat/index.vue
View file @
f6f786f1
...
...
@@ -175,6 +175,13 @@ const onSend = async (val?: string) => {
})
return
}
if
(
activeConversationId
.
value
==
null
)
{
ElMessage
({
message
:
'还没创建对话,不能发送!'
,
type
:
'error'
})
return
}
// TODO 芋艿:这块交互要在优化;应该是先插入到 UI 界面,里面会有当前的消息,和正在思考中;之后发起请求;
// 清空输入框
prompt
.
value
=
''
...
...
@@ -346,21 +353,6 @@ onMounted(async () => {
}
// 获取列表数据
await
getMessageList
()
// scrollToBottom();
// await nextTick
// 监听滚动事件,判断用户滚动状态
// messageContainer.value.addEventListener('scroll', handleScroll)
// 添加 copy 监听
// messageContainer.value.addEventListener('click', (e: any) => {
// console.log(e)
// if (e.target.id === 'copy') {
// copy(e.target?.dataset?.copy)
// ElMessage({
// message: '复制成功!',
// type: 'success'
// })
// }
// })
})
</
script
>
...
...
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