Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
ai-chat-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenghong_tao
ai-chat-ui
Commits
4115f646
Commit
4115f646
authored
Apr 26, 2025
by
chenghong_tao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix loading及历史会话重复
parent
d9b5230d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
HistoryList.vue
src/components/HistoryList.vue
+13
-1
aiBubble.vue
src/components/chatSubassembly/aiBubble.vue
+1
-0
inputMessage.vue
src/components/chatSubassembly/inputMessage.vue
+1
-3
No files found.
src/components/HistoryList.vue
View file @
4115f646
...
...
@@ -134,7 +134,19 @@ const getConversationMsg = async (id) => {
taskStore
.
setMessageId
(
''
);
taskStore
.
setWorkflowRunId
(
''
);
console
.
log
(
"result:"
,
result
);
emits
(
"getHistoryMsg"
,
result
.
data
);
const
data
=
result
.
data
// data是一个数组[{query: '....', ...}], 查询所有数据,根据query是否相同,如果有相同数据,则过滤仅保留最后一条
const
uniqueData
=
data
.
reduce
((
acc
,
curr
)
=>
{
const
existingIndex
=
acc
.
findIndex
((
item
)
=>
item
.
query
===
curr
.
query
);
if
(
existingIndex
===
-
1
)
{
acc
.
push
(
curr
);
}
else
{
acc
[
existingIndex
]
=
curr
;
}
return
acc
;
},
[]);
emits
(
"getHistoryMsg"
,
uniqueData
);
};
const
openEdit
=
(
id
)
=>
{
...
...
src/components/chatSubassembly/aiBubble.vue
View file @
4115f646
...
...
@@ -191,6 +191,7 @@ const reStartSSE = () => {
// if(workflowItemRef.value) {
// workflowItemRef.value.clearWorkflow();
// }
emits
(
"messageFinished"
,
false
);
startSSE
(
props
.
query
);
console
.
log
(
'reStartSSE'
,
props
.
query
,
props
.
messageType
,
props
.
content
)
};
...
...
src/components/chatSubassembly/inputMessage.vue
View file @
4115f646
...
...
@@ -70,9 +70,7 @@ const props = defineProps({
watch
(
()
=>
props
.
loadingFinished
,
(
newValue
)
=>
{
if
(
newValue
)
{
senderLoading
.
value
=
false
;
}
senderLoading
.
value
=
!
newValue
;
}
);
...
...
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