|
@@ -1,7 +1,7 @@
|
|
|
import { computed, ref } from 'vue';
|
|
import { computed, ref } from 'vue';
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
|
-import { editSessionTitle, getHistoryList, pinSession } from '/@/views/ventAI/manageAssistent/api';
|
|
|
|
|
|
|
+import { buildReportDownloadUrl, editSessionTitle, getHistoryList, pinSession } from '/@/views/ventAI/manageAssistent/api';
|
|
|
import type { Message, Task } from '/@/views/ventAI/manageAssistent/types/index';
|
|
import type { Message, Task } from '/@/views/ventAI/manageAssistent/types/index';
|
|
|
import { normalizeLineBreaks } from '/@/views/ventAI/manageAssistent/lib/index';
|
|
import { normalizeLineBreaks } from '/@/views/ventAI/manageAssistent/lib/index';
|
|
|
|
|
|
|
@@ -162,7 +162,8 @@ export const useChatTasks = () => {
|
|
|
} else if (item.role === 'assistant') {
|
|
} else if (item.role === 'assistant') {
|
|
|
const msg: Message = { id: item.id, type: 'ai', content: normalizedContent, time, createdAt };
|
|
const msg: Message = { id: item.id, type: 'ai', content: normalizedContent, time, createdAt };
|
|
|
if (item.report_url && item.report_filename) {
|
|
if (item.report_url && item.report_filename) {
|
|
|
- msg.downloadFiles = [{ url: item.report_url, filename: item.report_filename }];
|
|
|
|
|
|
|
+ // 后端返回的报告地址前缀不稳定(绝对地址 / 缺 /ventAI 的相对路径),入前端状态前统一归一
|
|
|
|
|
+ msg.downloadFiles = [{ url: buildReportDownloadUrl(item.report_url), filename: item.report_filename }];
|
|
|
}
|
|
}
|
|
|
if (item.citations) {
|
|
if (item.citations) {
|
|
|
// 历史接口返回 citations 为扁平数组,SSE 事件返回 { items, model_only },统一归一化
|
|
// 历史接口返回 citations 为扁平数组,SSE 事件返回 { items, model_only },统一归一化
|