BigPizzaV3/CodexPlusPlus · error
theme.json.{key} 无效
Error message
theme.json.{key} 无效 What it means
Thrown by validate_theme inside a loop over optional display fields (brandSubtitle, tagline, projectPrefix, projectLabel, statusText, quote, promoTitle, promoSub): a field is present but is not a string or fails safe_manifest_text(text, 0, 120, false). The offending input is theme.json's {key} field; optional fields may be omitted but never malformed.
Source
Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1039
{
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} 无效");
}
}
if object.get("promoUrl").is_some_and(|value| {
value
.as_str()
.is_none_or(|text| !safe_manifest_text(text, 0, 512, false))
}) || object.get("appearance").is_some_and(|value| {
value
.as_str()
.is_none_or(|appearance| !matches!(appearance, "auto" | "light" | "dark"))
}) {
bail!("theme.json 的链接或外观字段无效");
}
if let Some(art) = object.get("art") {
validate_theme_art(art)?;
}
if let Some(colors) = object.get("colors") {
let colors = colors.as_object().context("theme.json.colors 必须是对象")?;View on GitHub (pinned to f2074595a2)
Solutions
- 把对应字段缩短到 120 字符内
- 确保字段是字符串类型或直接删除该可选字段
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1039 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/92b976b8289ef4d8.
Report an issue: GitHub.