From d994ca2b93aedd40e338968802cdedbe62219067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 28 May 2026 12:28:01 +0800 Subject: [PATCH] =?UTF-8?q?ai=E6=A8=A1=E5=9D=97=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/css/ai_floating.css | 53 ------------------- yuthon_ai_agent/static/src/js/ai_floating.js | 4 +- 2 files changed, 2 insertions(+), 55 deletions(-) diff --git a/yuthon_ai_agent/static/src/css/ai_floating.css b/yuthon_ai_agent/static/src/css/ai_floating.css index 3bd026a75..4857c61cc 100644 --- a/yuthon_ai_agent/static/src/css/ai_floating.css +++ b/yuthon_ai_agent/static/src/css/ai_floating.css @@ -1,56 +1,3 @@ -/* ====== 顶部托盘按钮 ====== */ -.o_ai_systray { - display: flex; - align-items: center; - height: 100%; -} -.o_ai_systray_btn { - background: none; - border: none; - cursor: pointer; - padding: 0 10px; - height: 100%; - display: flex; - align-items: center; - position: relative; -} -.o_ai_icon_wrap { - display: flex; - align-items: center; - justify-content: center; - width: 32px; - height: 32px; - border-radius: 8px; - background: linear-gradient(135deg, #7c3aed, #a855f7); - color: #fff; - font-size: 16px; - box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35); - transition: all 0.25s ease; - animation: ai_pulse 2s ease-in-out infinite; -} -.o_ai_systray_btn:hover .o_ai_icon_wrap { - transform: scale(1.12); - box-shadow: 0 3px 14px rgba(124, 58, 237, 0.5); - animation: none; -} -@keyframes ai_pulse { - 0%, 100% { box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35); } - 50% { box-shadow: 0 2px 16px rgba(124, 58, 237, 0.6); } -} -.o_ai_badge { - position: absolute; - top: 6px; - right: 4px; - background: #e74c3c; - color: #fff; - font-size: 10px; - border-radius: 10px; - padding: 1px 5px; - min-width: 16px; - text-align: center; - line-height: 1.4; -} - /* ====== 浮动聊天窗口 ====== */ .o_ai_floating_chat_wrapper { position: fixed; diff --git a/yuthon_ai_agent/static/src/js/ai_floating.js b/yuthon_ai_agent/static/src/js/ai_floating.js index a911e0d4d..7de5b0364 100644 --- a/yuthon_ai_agent/static/src/js/ai_floating.js +++ b/yuthon_ai_agent/static/src/js/ai_floating.js @@ -41,7 +41,7 @@ async function loadHistory() { try { const data = await rpcCall("/ai/chat/history", { conversation_id: id }); return data.error ? [] : (data.messages || []); - } catch { + } catch (e) { return []; } } @@ -50,7 +50,7 @@ async function loadConversations() { try { const data = await rpcCall("/ai/conversation/list", {}); return data.conversations || []; - } catch { + } catch (e) { return []; } }