交付类工具的裸 cause 补工具前缀
- delivery_status 的 StatusUnavailable 文案改为「交付状态读取失败:{cause}」
- register_delivery_contract 的 ContractRejected 文案改为「登记交付合同失败:{cause}」
- update_plan 的 PlanRejected 文案改为「更新计划失败:{cause}」
- 这些 cause 是 direct_delivery 的内部机器码(如 delivery-status-worker-exited),原来单独回给模型时没有任何工具上下文
This commit is contained in:
@@ -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}"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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}"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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}"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user