fix: RAG检索状态消息在AI回复后自动清除
给 appendSystemMessage 增加可选 tempClass 参数, 所有 RAG 状态消息标记为 'rag-status' class, 流式结束后和报错时统一移除这些临时消息。
This commit is contained in:
@@ -309,9 +309,10 @@ export function appendAssistantPlaceholder() {
|
||||
}
|
||||
|
||||
/** 追加系统提示消息 */
|
||||
export function appendSystemMessage(text) {
|
||||
export function appendSystemMessage(text, tempClass) {
|
||||
const div = document.createElement('div');
|
||||
div.style.cssText = 'text-align:center;padding:8px;font-size:12px;color:var(--text-muted);';
|
||||
if (tempClass) div.classList.add(tempClass);
|
||||
div.textContent = text;
|
||||
emptyStateEl.style.display = 'none';
|
||||
messagesContainerEl.style.display = '';
|
||||
|
||||
Reference in New Issue
Block a user