|
|
@@ -1,6 +1,7 @@
|
|
|
import { nextTick, toRaw } from 'vue';
|
|
|
import type { AskUserQuestion, Message, Task, ThinkingStep, SseEvent } from '/@/views/ventAI/manageAssistent/types/index';
|
|
|
import { normalizeLineBreaks } from '/@/views/ventAI/manageAssistent/lib/index';
|
|
|
+import { buildReportDownloadUrl } from '/@/views/ventAI/manageAssistent/api';
|
|
|
|
|
|
// 工具名 → 中文智能体名(agent 分组标题用)。仅本模块使用,随事件映射一起内聚在此
|
|
|
const AGENT_NAME_MAP: Record<string, string> = {
|
|
|
@@ -206,7 +207,8 @@ export const useChatStream = (hooks: ChatStreamHooks) => {
|
|
|
});
|
|
|
if (data.download_url) {
|
|
|
if (!aiMsg.downloadFiles) aiMsg.downloadFiles = [];
|
|
|
- aiMsg.downloadFiles.push({ url: data.download_url, filename: data.filename || '文件' });
|
|
|
+ // 与历史加载一致:后端返回的报告地址前缀不稳定,入状态前统一归一(见 buildReportDownloadUrl)
|
|
|
+ aiMsg.downloadFiles.push({ url: buildReportDownloadUrl(data.download_url), filename: data.filename || '文件' });
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
@@ -276,8 +278,9 @@ export const useChatStream = (hooks: ChatStreamHooks) => {
|
|
|
|
|
|
case 'word_download':
|
|
|
if (normalizedContent) {
|
|
|
- aiMsg.wordDownloadUrl = normalizedContent;
|
|
|
- streamingTask.wordUrl = normalizedContent;
|
|
|
+ const reportUrl = buildReportDownloadUrl(normalizedContent);
|
|
|
+ aiMsg.wordDownloadUrl = reportUrl;
|
|
|
+ streamingTask.wordUrl = reportUrl;
|
|
|
}
|
|
|
break;
|
|
|
|