From d2c8d44daf5b7928ae214fe296faefbfde854b81 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Sat, 7 Mar 2026 22:56:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(config):=20=E8=AE=BE=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=99=BA=E8=83=BD=E4=BD=93ID=E4=B8=BA=20ChatbotAgent?= =?UTF-8?q?=EF=BC=8C=E7=A1=AE=E4=BF=9D=E5=85=BC=E5=AE=B9=E6=97=A7=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/app.py | 7 ++- .../ToolCallingResult/BaseToolCall.vue | 52 +++++++++++++++++-- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/src/config/app.py b/src/config/app.py index 5e638959..98543fe5 100644 --- a/src/config/app.py +++ b/src/config/app.py @@ -70,7 +70,7 @@ class Config(BaseModel): # ============================================================ # 智能体配置 # ============================================================ - default_agent_id: str = Field(default="", description="默认智能体ID") + default_agent_id: str = Field(default="ChatbotAgent", description="默认智能体ID") # ============================================================ # 模型信息(只读,不持久化) @@ -149,6 +149,11 @@ class Config(BaseModel): else: logger.warning(f"Unknown config key: {key}") + # 确保默认智能体为 ChatbotAgent(兼容旧配置) + if not self.default_agent_id: + self.default_agent_id = "ChatbotAgent" + logger.info("default_agent_id not set, using default: ChatbotAgent") + except Exception as e: logger.error(f"Failed to load config from {self._config_file}: {e}") diff --git a/web/src/components/ToolCallingResult/BaseToolCall.vue b/web/src/components/ToolCallingResult/BaseToolCall.vue index 8f377ee9..a0db2e66 100644 --- a/web/src/components/ToolCallingResult/BaseToolCall.vue +++ b/web/src/components/ToolCallingResult/BaseToolCall.vue @@ -10,10 +10,10 @@ - + - + @@ -93,7 +93,26 @@