From a404cd8be7d41dc7211f481680cdbcbeeee704b2 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 29 Jul 2025 19:57:47 +0800 Subject: [PATCH] perf: Assistant base embedded --- frontend/public/assistant.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/public/assistant.js b/frontend/public/assistant.js index e2421176..cc0d7b2b 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', @@ -461,8 +461,10 @@ let tempData = Object.assign(defaultData, { id, domain_url }) if (config_json) { const config = JSON.parse(config_json) - Object.assign(tempData, config) - tempData = Object.assign(tempData, config) + if (config) { + delete config.id + tempData = Object.assign(tempData, config) + } } tempData['online'] = online && online.toString().toLowerCase() == 'true' initsqlbot_assistant(tempData)