From ad1c08a2ccfb6434741eee511c8ff882cc5456d6 Mon Sep 17 00:00:00 2001 From: dekun Date: Sun, 14 Jun 2026 02:02:33 +0800 Subject: [PATCH] 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 --- manual_trading_hub/static/app.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/manual_trading_hub/static/app.js b/manual_trading_hub/static/app.js index 139030a..b16db80 100644 --- a/manual_trading_hub/static/app.js +++ b/manual_trading_hub/static/app.js @@ -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)) {