From 263733769a09b9a4553bb8e64fc73812a6a75a95 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 30 Mar 2026 14:23:31 +0800 Subject: [PATCH] fix(assistant): High-resolution icon for the assistant --- frontend/public/assistant.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/public/assistant.js b/frontend/public/assistant.js index a986eaa97..acad2a85f 100644 --- a/frontend/public/assistant.js +++ b/frontend/public/assistant.js @@ -1,4 +1,4 @@ -;(function () { +; (function () { window.sqlbot_assistant_handler = window.sqlbot_assistant_handler || {} const defaultData = { id: '1', @@ -170,6 +170,13 @@ chat_button_img = root.querySelector('.sqlbot-assistant-chat-button > img') } chat_button_img.style.display = 'block' + function resizeImg() { + const rate = window.outerWidth / window.innerWidth; + chat_button_img.style.width = `${30 * (1 / rate)}px`; + chat_button_img.style.height = `${30 * (1 / rate)}px`; + } + resizeImg() + window.addEventListener('resize', resizeImg); // 对话框元素 const chat_container = root.querySelector('#sqlbot-assistant-chat-container') // 引导层