按字符数限制 Skill 名称
使用 Unicode 字符数量而非 UTF-8 字节长度执行 120 字符上限 让多字节 Skill 名称与资源 ID 的长度校验口径一致
This commit is contained in:
@@ -39,7 +39,7 @@ pub(crate) fn validate_direct_codex_user_item(
|
||||
DirectCodexUserContentPart::AgcSkillReference { name } => {
|
||||
let name = name.trim();
|
||||
if name.is_empty()
|
||||
|| name.len() > 120
|
||||
|| name.chars().count() > 120
|
||||
|| name.chars().any(|character| {
|
||||
character.is_control()
|
||||
|| character.is_whitespace()
|
||||
|
||||
Reference in New Issue
Block a user