From 9ec8839efaa0085df7c3c5a9cfc8673f26b9d819 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 14 Sep 2025 21:01:32 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=A3=80=E6=9F=A5=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E5=95=86=E5=8F=AF=E7=94=A8=E6=80=A7=E6=97=B6?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E6=9C=AA=E5=90=AF=E7=94=A8=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E5=95=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/provider/manager.py | 1 + dashboard/src/views/ProviderPage.vue | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/astrbot/core/provider/manager.py b/astrbot/core/provider/manager.py index bbf526d4e..3b50e4976 100644 --- a/astrbot/core/provider/manager.py +++ b/astrbot/core/provider/manager.py @@ -391,6 +391,7 @@ class ProviderManager: # 和配置文件保持同步 config_ids = [provider["id"] for provider in self.providers_config] + logger.debug(f"providers in user's config: {config_ids}") for key in list(self.inst_map.keys()): if key not in config_ids: await self.terminate_provider(key) diff --git a/dashboard/src/views/ProviderPage.vue b/dashboard/src/views/ProviderPage.vue index 941de4780..9915f0112 100644 --- a/dashboard/src/views/ProviderPage.vue +++ b/dashboard/src/views/ProviderPage.vue @@ -712,6 +712,19 @@ export default { // 2. 为每个provider创建一个并发的测试请求 const promises = this.config_data.provider.map(p => { + if (!p.enable) { + const index = this.providerStatuses.findIndex(s => s.id === p.id); + if (index !== -1) { + const disabledStatus = { + ...this.providerStatuses[index], + status: 'unavailable', + error: '该提供商未被用户启用' + }; + this.providerStatuses.splice(index, 1, disabledStatus); + } + return Promise.resolve(); + } + return axios.get(`/api/config/provider/check_one?id=${p.id}`) .then(res => { if (res.data && res.data.status === 'ok') { @@ -887,4 +900,9 @@ export default { .v-window { border-radius: 4px; } + +.status-card { + height: 120px; + overflow-y: auto; +}