From a726de0f964a978905fde53a754e14827f172304 Mon Sep 17 00:00:00 2001 From: GentleBurr Date: Fri, 22 May 2026 18:30:34 +0200 Subject: [PATCH] fix(character): support integer type for lorebook entry position Change the `position` field type in `CharaCardCharacterBookEntry` to handle both integers and strings during JSON deserialization. Some character card exporters output this property as an integer index rather than a string descriptor, which previously caused the entire import process to fail due to a Serde type mismatch. --- src-tauri/src/storage_manager/entity_transfer/engine.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/storage_manager/entity_transfer/engine.rs b/src-tauri/src/storage_manager/entity_transfer/engine.rs index 703513763..f3c196eb4 100644 --- a/src-tauri/src/storage_manager/entity_transfer/engine.rs +++ b/src-tauri/src/storage_manager/entity_transfer/engine.rs @@ -274,7 +274,7 @@ pub struct CharaCardCharacterBookEntry { #[serde(default)] pub constant: Option, #[serde(default)] - pub position: Option, + pub position: Option, } pub fn looks_like_chara_card_v2(value: &JsonValue) -> bool {