feat: expand character editor to show all v2/v3 character card fields

Added support for all v2/v3 character card fields in the character editor UI:
- Description (10-row textarea)
- Scenario
- Message Example
- Post-History Instructions
- Alternate Greetings (one per line)
- Tags (comma-separated)
- Creator
- Character Version
- Creator Notes

Updated frontend to load and save all fields, and backend update_character
command to accept all new parameters. This allows imported v3 character cards
to display their full details, especially the description field which contains
the main character information.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-14 08:42:29 -07:00
parent 62a0e387d2
commit 0712b1c422
3 changed files with 128 additions and 0 deletions

View File

@@ -630,6 +630,15 @@ fn update_character(
system_prompt: String,
greeting: Option<String>,
personality: Option<String>,
description: Option<String>,
scenario: Option<String>,
mes_example: Option<String>,
post_history: Option<String>,
alt_greetings: Option<Vec<String>>,
tags: Option<Vec<String>>,
creator: Option<String>,
character_version: Option<String>,
creator_notes: Option<String>,
avatar_path: Option<String>,
) -> Result<(), String> {
let mut character = get_active_character();
@@ -637,6 +646,15 @@ fn update_character(
character.system_prompt = system_prompt;
character.greeting = greeting;
character.personality = personality;
character.description = description;
character.scenario = scenario;
character.mes_example = mes_example;
character.post_history_instructions = post_history;
character.alternate_greetings = alt_greetings.unwrap_or_default();
character.tags = tags.unwrap_or_default();
character.creator = creator;
character.character_version = character_version;
character.creator_notes = creator_notes;
character.avatar_path = avatar_path;
save_character(&character)
}