自å删除自动请求智能助手逻辑

This commit is contained in:
luke 2025-06-09 23:32:20 +08:00
parent 90255f9db0
commit 1b2debb4ea
5 changed files with 2 additions and 15 deletions

View File

@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "渠道应用开发部知识库",
"version": "2.0.4",
"version": "2.0.5",
"description": "通过关键词快速搜索内部文档",
"permissions": ["storage"],
"host_permissions": [

View File

@ -51,7 +51,6 @@
<div class="form-group">
<input id="username" placeholder="用户名" />
<input id="password" type="password" placeholder="密码" />
<input type="password" id="llmPassword" placeholder="请输入AnythingLLM的密码" autocomplete="off" />
<button id="loginBtn">登录</button>
</div>
<div class="error" id="errorBox"></div>

View File

@ -8,4 +8,5 @@
| 2025.06.03 | V2.0.2 | Luke.Ye | 支持LLM工作区配置化 |
| 2025.06.06 | V2.0.3 | Luke.Ye | 添加跳转页面权限校验 |
| 2025.06.09 | V2.0.4 | Luke.Ye | 优化es搜索展示页面 |
| 2025.06.10 | V2.0.5 | Luke.Ye | 移除自动请求智能助手逻辑 |

View File

@ -13,13 +13,6 @@ document.addEventListener("DOMContentLoaded", async function () {
const resTokenField = resParams.find(p => p.label.includes("Token"))?.field || "token";
const resUsernameField = resParams.find(p => p.label.includes("用户名"))?.field || "username";
// 自动填充 LLM 密码(与登录无关,只是附带存储)
chrome.storage.local.get(["llmPassword"], function (res) {
if (res.llmPassword) {
document.getElementById("llmPassword").value = res.llmPassword;
}
});
document.getElementById("loginBtn").addEventListener("click", doLogin);
document.addEventListener("keydown", (e) => {
if (e.key === "Enter") doLogin();
@ -28,7 +21,6 @@ document.addEventListener("DOMContentLoaded", async function () {
function doLogin() {
const username = document.getElementById("username").value.trim();
const password = document.getElementById("password").value.trim();
const llmPassword = document.getElementById("llmPassword").value;
const errorBox = document.getElementById("errorBox");
errorBox.textContent = "";
@ -37,8 +29,6 @@ document.addEventListener("DOMContentLoaded", async function () {
return;
}
chrome.storage.local.set({ llmPassword });
const requestBody = {};
requestBody[reqUsernameField] = username;
requestBody[reqPasswordField] = password;

View File

@ -85,9 +85,6 @@ document.addEventListener("DOMContentLoaded", async () => {
if (!token || !raw) return;
updateHistory(raw);
renderHistoryTags(true);
if (!isNewTab) {
fetchLLMAnswer(raw, llmResultContainer, llmResultContent);
}
fetchResults(raw, 1);
}