agc_generate_image 的 kind 不合法时回显截到 120 字符
- KindUnsupported 的 got 原来把整段 kind 原样带进文案与序列化错误;这条路径没有长度校验,与上方 KindNotText 的 not_text_repr 口径也不一致 - 改用 bounded_echo(kind),与其它不受信回显同一上限;仍保留开头的原值,模型能看出自己传了什么 验证:cargo fmt --check 通过
This commit is contained in:
@@ -2925,7 +2925,7 @@ fn bridge_image_generation_kind(
|
||||
};
|
||||
normalize_platform_art_asset_generation_kind(kind).ok_or_else(|| {
|
||||
GenerateImageError::KindUnsupported {
|
||||
got: kind.to_string(),
|
||||
got: bounded_echo(kind),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user