BigPizzaV3/CodexPlusPlus · error

theme.json.name 无效

Error message

theme.json.name 无效

What it means

Thrown by validate_theme when theme.json's name field is absent or fails the safe-text constraints applied to it (non-string or outside allowed length/charset). The offending input is the theme.json name value; this is the display-name guard that runs right after the identity/background consistency check.

Source

Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1022

        || object
            .keys()
            .any(|key| !REQUIRED.contains(&key.as_str()) && !OPTIONAL.contains(&key.as_str()))
    {
        bail!("theme.json 包含缺失或不支持的字段");
    }
    if object.get("schemaVersion").and_then(Value::as_u64) != Some(1)
        || object.get("id").and_then(Value::as_str) != Some(manifest.theme_id.as_str())
        || object.get("name").and_then(Value::as_str).is_none()
        || object.get("image").and_then(Value::as_str) != Some(image_name)
    {
        bail!("theme.json 与 manifest 身份或背景图不一致");
    }
    if object
        .get("name")
        .and_then(Value::as_str)
        .is_some_and(|name| !safe_manifest_text(name, 1, 80, false))
    {
        bail!("theme.json.name 无效");
    }
    for key in [
        "brandSubtitle",
        "tagline",
        "projectPrefix",
        "projectLabel",
        "statusText",
        "quote",
        "promoTitle",
        "promoSub",
    ] {
        if object.get(key).is_some_and(|value| {
            value
                .as_str()
                .is_none_or(|text| !safe_manifest_text(text, 0, 120, false))
        }) {
            bail!("theme.json.{key} 无效");
        }

View on GitHub (pinned to f2074595a2)

Solutions

  1. 把 name 改为合法安全文本字符串
  2. 去掉控制字符或超长内容
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1022 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23). Data as JSON: /api/errors/3037873c6f4bdd74. Report an issue: GitHub.