From 659c470eba542383987aad227b7f918100f131fa Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期五, 11 九月 2026 15:09:05 +0800
Subject: [PATCH] 小智终端 5种 场景模式 OK

---
 xiaozhi-esp32-server/main/xiaozhi-server/core/providers/tools/device_mcp/mcp_handler.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/xiaozhi-esp32-server/main/xiaozhi-server/core/providers/tools/device_mcp/mcp_handler.py b/xiaozhi-esp32-server/main/xiaozhi-server/core/providers/tools/device_mcp/mcp_handler.py
index 76994ca..7e12b60 100644
--- a/xiaozhi-esp32-server/main/xiaozhi-server/core/providers/tools/device_mcp/mcp_handler.py
+++ b/xiaozhi-esp32-server/main/xiaozhi-server/core/providers/tools/device_mcp/mcp_handler.py
@@ -216,6 +216,15 @@
                     if hasattr(conn, "func_handler") and conn.func_handler:
                         conn.func_handler.tool_manager.refresh_tools()
                         conn.func_handler.current_support_functions()
+
+                    try:
+                        from core.app_runtime.runtime import (
+                            schedule_ensure_subscribed_app_sd_dirs,
+                        )
+
+                        schedule_ensure_subscribed_app_sd_dirs(conn)
+                    except Exception as e:
+                        logger.bind(tag=TAG).warning(f"璋冨害璁㈤槄 App 寤虹洰褰曞け璐�: {e}")
             return
 
     # Handle method calls (requests from the client)

--
Gitblit v1.9.1