fix: reduce MCP server status polling frequency (#7399)

This commit is contained in:
M1LKT
2026-04-07 10:39:38 +08:00
committed by GitHub
parent c48288d8f6
commit 42fc16f1f0
2 changed files with 5 additions and 4 deletions

View File

@@ -284,8 +284,9 @@ export default {
mounted() {
this.getServers();
this.refreshInterval = setInterval(() => {
// 轮询时间延长到30秒减少服务器压力同时保持数据相对新鲜
this.getServers();
}, 5000);
}, 30000);
},
unmounted() {
if (this.refreshInterval) {

View File

@@ -162,7 +162,7 @@ const {
<InstalledPluginsTab :state="pageState" />
<!-- 指令面板标签页内容 -->
<v-tab-item v-show="activeTab === 'components'">
<v-tab-item v-if="activeTab === 'components'">
<div class="mb-4 pt-4 pb-4">
<div class="d-flex align-center flex-wrap" style="gap: 12px">
<h2 class="text-h2 mb-0">{{ tm("tabs.handlersOperation") }}</h2>
@@ -180,7 +180,7 @@ const {
</v-tab-item>
<!-- 已安装的 MCP 服务器标签页内容 -->
<v-tab-item v-show="activeTab === 'mcp'">
<v-tab-item v-if="activeTab === 'mcp'">
<div class="mb-4 pt-4 pb-4">
<div class="d-flex align-center flex-wrap" style="gap: 12px">
<h2 class="text-h2 mb-0">{{ tm("tabs.installedMcpServers") }}</h2>
@@ -198,7 +198,7 @@ const {
</v-tab-item>
<!-- Skills 标签页内容 -->
<v-tab-item v-show="activeTab === 'skills'">
<v-tab-item v-if="activeTab === 'skills'">
<div class="mb-4 pt-4 pb-4">
<div class="d-flex align-center flex-wrap" style="gap: 12px">
<h2 class="text-h2 mb-0">{{ tm("tabs.skills") }}</h2>