fix(catalog): import the card definition into description, not personality - #394
Merged
Merged
Conversation
…ality
Every catalog provider that reads a site API (DataCat, JanitorAI, Chub,
Janny) wrote the character definition into `CharacterData.personality`
and left `description` empty, while the local extractors and the PNG/JSON
importer put it into `description`. Presets that only reference
{{description}} — the field every SillyTavern preset uses — therefore
built a prompt with no character definition at all.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every catalog provider that reads a site API wrote the character definition into
CharacterData.personalityand leftdescriptionempty, while the local extractors (janitor_extractor.dart,saucepan_extractor.dart) and the PNG/JSON importer (character_importer.dart) put it intodescription. A preset that only references{{description}}— the field SillyTavern fills fromdata.description, and what most imported presets use — therefore built a prompt with no character definition at all.This aligns the API providers with the local paths, with SillyTavern's
getCharacterCardFields(), and withbuildV2FromDatacatin the SillyTavern-CharacterLibrary reference (definition intodata.description,data.personalityleft empty).Changes
datacat_provider.dart—_datacatCharacterDatareturns the resolved definition asdescriptionand leavespersonalityempty; doc comment updated to describe the new placement. The definition-picking logic (Saucepan branch, recovery variants,chara_card_v2_jsonfallback) is unchanged.janitor_provider.dart—_convertToGlazemaps the row'spersonality(the real definition) todescription. Still no fallback to the row'sdescription: that is the public HTML blurb and stays increatorNotes, so a closed card imports with an empty definition rather than a bio in the prompt body.chub_provider.dart—_convertToGlazemapsdefinition.personalitytodescription, and additionally mapsdefinition.tavern_personalitytopersonality, which is the actual V2 personality field and was previously dropped.janny_provider.dart—jannyFetchCharactermapspersonalitytodescription.catalog_detail_launcher.dart— the preview follows: the "does the DataCat copy carry the prompt?" check in_datacatCardand the closed-JanitorAI-card placeholder in_toCharacternow readdescription.Notes
personality; no migration is included.Verification
flutter analyze lib/features/catalog— no new issues (the twounused_elementwarnings injanitor_lorebook_capture_sheet.dartare pre-existing and in an untouched file).flutter test test/janitor_field_diff_test.dart test/catalog_provider_switch_race_test.dart test/janitor_separate_test.dart test/janitor_public_lorebook_test.dart— 49 passing. There are no unit tests covering the provider field maps.flutter testsuite and the WebView render suite — left to CI.🤖 Generated with Claude Code