fix(hub): remove duplicate AI chat declarations causing white screen

Drop redeclared AI_CHAT_MAX_ATTACHMENTS and aiChatPendingFiles in app.js that broke script parsing after the chat perf update.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-14 02:02:33 +08:00
parent 467d160f4d
commit ad1c08a2cc
+2 -5
View File
@@ -3519,6 +3519,8 @@
let aiSelectedBotMode = "trading";
const AI_CHAT_MAX_ATTACHMENTS = 3;
let aiChatPendingFiles = [];
const aiChatMdCache = new Map();
const AI_CHAT_MD_CACHE_MAX = 120;
function aiChatFileKind(file) {
return file && file.type && file.type.startsWith("image/") ? "image" : "text";
@@ -3623,11 +3625,6 @@
addAiChatPendingFiles(imageFiles);
}
const AI_CHAT_MAX_ATTACHMENTS = 3;
let aiChatPendingFiles = [];
const aiChatMdCache = new Map();
const AI_CHAT_MD_CACHE_MAX = 120;
function renderHubMarkdown(text, cacheKey) {
const raw = String(text || "");
if (cacheKey && aiChatMdCache.has(cacheKey)) {