fix: 在 markdown 渲染前清理裸来源标注词(覆盖句尾。工单等情况)
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 18s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 41s

This commit is contained in:
gongzhiyong
2026-04-15 03:31:42 +08:00
parent 2574dd2bbf
commit 1e3ecc6d44
6 changed files with 94 additions and 32 deletions
@@ -309,6 +309,11 @@ export default function MessageBubble({ content: rawContent, role, isStreaming,
content = String(rawContent ?? "");
}
// Strip bare source annotation words from content before markdown rendering
content = content
.replace(/([。!?.!?])\s*(工单|知识库|网络|推断)\s*$/gm, '$1')
.replace(/\s+(工单|知识库|网络|推断)\s*$/gm, '');
// 思考计时器
const [thinkingDuration, setThinkingDuration] = useState(0);
const thinkingTimerRef = useRef<ReturnType<typeof setInterval> | undefined>(undefined);