diff --git a/frontend/src/components/ChatInterface.tsx b/frontend/src/components/ChatInterface.tsx index 1871245..3ec4fde 100644 --- a/frontend/src/components/ChatInterface.tsx +++ b/frontend/src/components/ChatInterface.tsx @@ -538,10 +538,10 @@ export function ChatInterface() { const currentReasoning = msg.reasoningContent || ""; return { ...msg, reasoningContent: currentReasoning + text }; } else { - // 对于普通的阶段性日志,保留最近的 8 条 + // 对于普通的阶段性日志,取消 8 条限制,允许滚动查看所有历史 const current = msg.progressLogs || []; if (current[current.length - 1] === text) return msg; - const next = [...current, text].slice(-8); + const next = [...current, text]; return { ...msg, progressLogs: next }; } }) @@ -991,22 +991,23 @@ export function ChatInterface() { )} {msg.progressLogs && msg.progressLogs.length > 0 ? (
-
+
{msg.awaitingFirstToken ? : } {msg.awaitingFirstToken ? "正在处理中" : "处理完成"}
-
+
{msg.progressLogs.map((log, idx, arr) => { const isLast = idx === arr.length - 1; - const isLoading = isLast && msg.awaitingFirstToken; + // 如果是正在处理的会话,且当前日志是最后一条,或者是明确包含“正在”的日志,则显示 loading + const isLoadingLog = (isLast && msg.awaitingFirstToken) || log.includes("正在"); return (
- {isLoading ? ( - + {isLoadingLog && msg.awaitingFirstToken ? ( + ) : ( - + )} - {log} + {log}
); })}