From 31fbadf260a44f357d17fd67e76702e0aaa80360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 1 Oct 2026 17:56:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E4=BB=98=E7=B1=BB=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=9A=84=E8=A3=B8=20cause=20=E8=A1=A5=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - delivery_status 的 StatusUnavailable 文案改为「交付状态读取失败:{cause}」 - register_delivery_contract 的 ContractRejected 文案改为「登记交付合同失败:{cause}」 - update_plan 的 PlanRejected 文案改为「更新计划失败:{cause}」 - 这些 cause 是 direct_delivery 的内部机器码(如 delivery-status-worker-exited),原来单独回给模型时没有任何工具上下文 --- .../src-tauri/src/agent/tool/delivery_status/error.rs | 2 +- .../src/agent/tool/register_delivery_contract/error.rs | 2 +- .../src-tauri/src/agent/tool/update_plan/error.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/delivery_status/error.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/delivery_status/error.rs index 3aafbe1e1..c6b0f7266 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/delivery_status/error.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/delivery_status/error.rs @@ -26,7 +26,7 @@ impl ToolFailure for DeliveryStatusError { match self { Self::ArgumentsNotAccepted => "交付状态工具不接受参数。".to_string(), Self::Gate(rejection) => rejection.to_user_msg(), - Self::StatusUnavailable { cause } => cause.to_string(), + Self::StatusUnavailable { cause } => format!("交付状态读取失败:{cause}"), } } diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/register_delivery_contract/error.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/register_delivery_contract/error.rs index 53a3b243e..7e875e207 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/register_delivery_contract/error.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/register_delivery_contract/error.rs @@ -24,7 +24,7 @@ impl ToolFailure for RegisterDeliveryContractError { fn to_user_msg(&self) -> String { match self { Self::Gate(rejection) => rejection.to_user_msg(), - Self::ContractRejected { cause } => cause.to_string(), + Self::ContractRejected { cause } => format!("登记交付合同失败:{cause}"), } } diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/update_plan/error.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/update_plan/error.rs index 0a6153966..17c606aec 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/update_plan/error.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/update_plan/error.rs @@ -23,7 +23,7 @@ impl ToolFailure for UpdatePlanError { fn to_user_msg(&self) -> String { match self { Self::Gate(rejection) => rejection.to_user_msg(), - Self::PlanRejected { cause } => cause.to_string(), + Self::PlanRejected { cause } => format!("更新计划失败:{cause}"), } }