抠图的 backgroundMode / screenColor 类型错改成「必须是字符串」
- BackgroundModeNotText、ScreenColorNotText 只在入参不是字符串时触发,文案却回的是取值白名单,模型会以为类型对了、只是值不对 - 改成与本模块其它 *NotText 变体一致的「必须是字符串」;取值白名单仍由 BackgroundModeUnsupported / ScreenColorMalformed 承担 - 文案字面变化:backgroundMode「必须是 complex 或 flat」→「必须是字符串」;screenColor「必须是 auto 或 #RRGGBB」→「必须是字符串」 验证:cargo fmt --all --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml -- --check 通过
This commit is contained in:
@@ -94,13 +94,13 @@ impl ToolFailure for RemoveBackgroundError {
|
||||
format!("抠图失败:assetName 必须是字符串,当前是「{got}」。")
|
||||
}
|
||||
Self::BackgroundModeNotText { got } => {
|
||||
format!("抠图失败:backgroundMode 必须是 complex 或 flat,当前是「{got}」。")
|
||||
format!("抠图失败:backgroundMode 必须是字符串,当前是「{got}」。")
|
||||
}
|
||||
Self::BackgroundModeUnsupported { got } => {
|
||||
format!("抠图失败:backgroundMode「{got}」不受支持,只能是 complex 或 flat。")
|
||||
}
|
||||
Self::ScreenColorNotText { got } => {
|
||||
format!("抠图失败:screenColor 必须是 auto 或 #RRGGBB,当前是「{got}」。")
|
||||
format!("抠图失败:screenColor 必须是字符串,当前是「{got}」。")
|
||||
}
|
||||
Self::ScreenColorMalformed { got } => {
|
||||
format!("抠图失败:screenColor「{got}」不是受支持的取值,必须是 auto 或 #RRGGBB。")
|
||||
|
||||
Reference in New Issue
Block a user