From 52a55319d5318f27be28601cce4d9cf6b9d7e2e2 Mon Sep 17 00:00:00 2001 From: dingjiahuichina Date: Mon, 1 Dec 2025 22:38:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=86=99=E5=85=A5Poly?= =?UTF-8?q?Mind=E7=9A=84MCP=E6=A0=BC=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/mcp_manage.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/backend/mcp_manage.sh b/backend/mcp_manage.sh index fffc108..331b0e5 100755 --- a/backend/mcp_manage.sh +++ b/backend/mcp_manage.sh @@ -158,7 +158,7 @@ is_app_installed() { local app="$1" case "$app" in - "roo code"|"roo-code") + "roo-code") if ! command -v "vscodium" >/dev/null 2>&1 && [[ ! -d "$CALL_USER_HOME/.config/VSCodium" ]]; then return 1 fi @@ -176,6 +176,15 @@ is_app_installed() { fi return 1 ;; + "PolyMind") + if command -v "polymind" >/dev/null 2>&1; then + return 0 + fi + if [[ -d "$CALL_USER_HOME/.config/PolyMind" ]]; then + return 0 + fi + return 1 + ;; *) if command -v "$app" >/dev/null 2>&1; then return 0 @@ -194,7 +203,7 @@ normalize_mcp_config() { local app="$2" case "$app" in - "DeepChat") + "DeepChat" | "PolyMind") jq ' .mcpServers |= with_entries(.value |= . + { descriptions: (.descriptions // .description // ""), @@ -286,6 +295,14 @@ query_mcp_in_all_apps() { local first=true for app in "${!APP_CONFIG_PATHS[@]}"; do + local user_config + user_config=$(get_app_config_path "$app") + + # 如果配置文件不存在,跳过此项 + if [[ ! -f "$user_config" ]]; then + continue + fi + local display_name="${APP_DISPLAY_NAMES[$app]:-$app}" local mcp_status="removed" @@ -324,6 +341,7 @@ MCP配置管理工具 (模块化接口版) help - 显示帮助 支持的应用: + PolyMind - PolyMind: DevStation 小助手 roo-code - Roo Code (基于VSCodium) DeepChat - DeepChat独立应用 -- Gitee