From 68c3ee4cb0b8657eee7bab3257f2f293b276320d Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Thu, 26 Jun 2025 16:34:29 +0800 Subject: [PATCH] 'commit' --- dsRag/static/ai.html | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/dsRag/static/ai.html b/dsRag/static/ai.html index 8c927e8c..9a3e58a7 100644 --- a/dsRag/static/ai.html +++ b/dsRag/static/ai.html @@ -73,6 +73,21 @@ background-color: #0056b3; } + #clearBtn { + background-color: #6c757d; + color: white; + border: none; + padding: 10px 20px; + font-size: 16px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s; + } + + #clearBtn:hover { + background-color: #5a6268; + } + .status { text-align: center; margin-bottom: 20px; @@ -132,6 +147,7 @@
+
@@ -139,6 +155,13 @@ let eventSource = null; let textBuffer = ''; + function clearAll() { + document.getElementById('dataArea').innerHTML = '等待问题...'; + document.getElementById('questionInput').value = ''; + document.getElementById('status').textContent = '准备就绪'; + document.getElementById('status').className = 'status'; + } + function submitQuestion() { const question = document.getElementById('questionInput').value.trim(); if (!question) { @@ -159,7 +182,7 @@ submitBtn.textContent = '处理中...'; // 更新状态 - statusDiv.textContent = '正在连接...'; + statusDiv.textContent = '生成中...'; statusDiv.className = 'status connecting'; // 使用fetch发送POST请求并获取完整响应