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
48b3b08f
authored
May 17, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】删除没用的 console
parent
cfdceca9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
6 deletions
+0
-6
src/views/ai/chat/Conversation.vue
+0
-2
src/views/ai/chat/Message.vue
+0
-1
src/views/ai/chat/index.vue
+0
-3
No files found.
src/views/ai/chat/Conversation.vue
View file @
48b3b08f
...
@@ -131,7 +131,6 @@ const getChatConversationList = async () => {
...
@@ -131,7 +131,6 @@ const getChatConversationList = async () => {
const
res
=
await
ChatConversationApi
.
getChatConversationMyList
()
const
res
=
await
ChatConversationApi
.
getChatConversationMyList
()
// 2、排序
// 2、排序
res
.
sort
((
a
,
b
)
=>
{
res
.
sort
((
a
,
b
)
=>
{
console
.
log
(
'sort'
,
a
,
b
)
return
b
.
updateTime
-
a
.
updateTime
return
b
.
updateTime
-
a
.
updateTime
})
})
conversationList
.
value
=
res
conversationList
.
value
=
res
...
@@ -162,7 +161,6 @@ const conversationTimeGroup = async (list: ChatConversationVO[]) => {
...
@@ -162,7 +161,6 @@ const conversationTimeGroup = async (list: ChatConversationVO[]) => {
const
threeDays
=
3
*
oneDay
;
const
threeDays
=
3
*
oneDay
;
const
sevenDays
=
7
*
oneDay
;
const
sevenDays
=
7
*
oneDay
;
const
thirtyDays
=
30
*
oneDay
;
const
thirtyDays
=
30
*
oneDay
;
console
.
log
(
'listlistlist'
,
list
)
for
(
const
conversation
:
ChatConversationVO
of
list
)
{
for
(
const
conversation
:
ChatConversationVO
of
list
)
{
// 置顶
// 置顶
if
(
conversation
.
pinned
)
{
if
(
conversation
.
pinned
)
{
...
...
src/views/ai/chat/Message.vue
View file @
48b3b08f
...
@@ -95,7 +95,6 @@ function handleScroll() {
...
@@ -95,7 +95,6 @@ function handleScroll() {
const
scrollTop
=
scrollContainer
.
scrollTop
const
scrollTop
=
scrollContainer
.
scrollTop
const
scrollHeight
=
scrollContainer
.
scrollHeight
const
scrollHeight
=
scrollContainer
.
scrollHeight
const
offsetHeight
=
scrollContainer
.
offsetHeight
const
offsetHeight
=
scrollContainer
.
offsetHeight
console
.
log
(
'scrollTop'
,
scrollTop
)
if
((
scrollTop
+
offsetHeight
)
<
(
scrollHeight
-
100
))
{
if
((
scrollTop
+
offsetHeight
)
<
(
scrollHeight
-
100
))
{
// 用户开始滚动并在最底部之上,取消保持在最底部的效果
// 用户开始滚动并在最底部之上,取消保持在最底部的效果
isScrolling
.
value
=
true
isScrolling
.
value
=
true
...
...
src/views/ai/chat/index.vue
View file @
48b3b08f
...
@@ -198,7 +198,6 @@ const doSendStream = async (userMessage: ChatMessageVO) => {
...
@@ -198,7 +198,6 @@ const doSendStream = async (userMessage: ChatMessageVO) => {
userMessage
.
content
,
userMessage
.
content
,
conversationInAbortController
.
value
,
conversationInAbortController
.
value
,
async
(
message
)
=>
{
async
(
message
)
=>
{
console
.
log
(
'message'
,
message
)
const
data
=
JSON
.
parse
(
message
.
data
)
// TODO 芋艿:类型处理;
const
data
=
JSON
.
parse
(
message
.
data
)
// TODO 芋艿:类型处理;
// debugger
// debugger
// 如果没有内容结束链接
// 如果没有内容结束链接
...
@@ -225,14 +224,12 @@ const doSendStream = async (userMessage: ChatMessageVO) => {
...
@@ -225,14 +224,12 @@ const doSendStream = async (userMessage: ChatMessageVO) => {
await
scrollToBottom
()
await
scrollToBottom
()
},
},
(
error
)
=>
{
(
error
)
=>
{
console
.
log
(
'error'
,
error
)
// 标记对话结束
// 标记对话结束
conversationInProgress
.
value
=
false
conversationInProgress
.
value
=
false
// 结束 stream 对话
// 结束 stream 对话
conversationInAbortController
.
value
.
abort
()
conversationInAbortController
.
value
.
abort
()
},
},
()
=>
{
()
=>
{
console
.
log
(
'close'
)
// 标记对话结束
// 标记对话结束
conversationInProgress
.
value
=
false
conversationInProgress
.
value
=
false
// 结束 stream 对话
// 结束 stream 对话
...
...
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