|
@@ -2,7 +2,7 @@
|
2
|
2
|
* @Author: wrh
|
3
|
3
|
* @Date: 2025-01-01 00:00:00
|
4
|
4
|
* @LastEditors: Please set LastEditors
|
5
|
|
- * @LastEditTime: 2025-07-29 15:42:41
|
|
5
|
+ * @LastEditTime: 2025-07-29 16:58:28
|
6
|
6
|
-->
|
7
|
7
|
<template>
|
8
|
8
|
<div class="agent-detail-container" v-loading="loading">
|
|
@@ -425,12 +425,9 @@ const submitChatUpload = async () => {
|
425
|
425
|
}
|
426
|
426
|
chatMessages.value.push(uploadMessage);
|
427
|
427
|
ElMessage.success('文件上传成功');
|
428
|
|
- await addTopic({ agentId: props.agentId, topic: fileName })
|
429
|
|
- const res = await listTopic({ agentId: props.agentId })
|
430
|
|
- if (res.rows.length > 0) {
|
431
|
|
- const topicId = res.rows[0].topicId
|
432
|
|
- await addChat({ userId: userStore.id, chatId, topicId, output: assistantContent, outputTime: proxy.parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}') })
|
433
|
|
- }
|
|
428
|
+ let topicRes = await addTopic({ agentId: props.agentId, topic: fileName });
|
|
429
|
+ const topicId = topicRes.msg;
|
|
430
|
+ await addChat({ userId: userStore.id, chatId, topicId, output: assistantContent, outputTime: proxy.parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}') });
|
434
|
431
|
|
435
|
432
|
nextTick(() => {
|
436
|
433
|
scrollToBottom()
|