fix: 在 markdown 渲染前清理裸来源标注词(覆盖句尾。工单等情况)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user