Skip to content

fix(catalog): import the card definition into description, not personality - #394

Merged
hydall merged 1 commit into
nightlyfrom
fix/catalog-definition-into-description
Sep 6, 2026
Merged

fix(catalog): import the card definition into description, not personality#394
hydall merged 1 commit into
nightlyfrom
fix/catalog-definition-into-description

Conversation

@hydall

@hydall hydall commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Every catalog provider that reads a site API wrote the character definition into CharacterData.personality and left description empty, while the local extractors (janitor_extractor.dart, saucepan_extractor.dart) and the PNG/JSON importer (character_importer.dart) put it into description. A preset that only references {{description}} — the field SillyTavern fills from data.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 with buildV2FromDatacat in the SillyTavern-CharacterLibrary reference (definition into data.description, data.personality left empty).

Changes

  • datacat_provider.dart_datacatCharacterData returns the resolved definition as description and leaves personality empty; doc comment updated to describe the new placement. The definition-picking logic (Saucepan branch, recovery variants, chara_card_v2_json fallback) is unchanged.
  • janitor_provider.dart_convertToGlaze maps the row's personality (the real definition) to description. Still no fallback to the row's description: that is the public HTML blurb and stays in creatorNotes, so a closed card imports with an empty definition rather than a bio in the prompt body.
  • chub_provider.dart_convertToGlaze maps definition.personality to description, and additionally maps definition.tavern_personality to personality, which is the actual V2 personality field and was previously dropped.
  • janny_provider.dartjannyFetchCharacter maps personality to description.
  • catalog_detail_launcher.dart — the preview follows: the "does the DataCat copy carry the prompt?" check in _datacatCard and the closed-JanitorAI-card placeholder in _toCharacter now read description.

Notes

  • Characters imported before this change still hold the definition in personality; no migration is included.

Verification

  • flutter analyze lib/features/catalog — no new issues (the two unused_element warnings in janitor_lorebook_capture_sheet.dart are 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.
  • Not run: the full flutter test suite and the WebView render suite — left to CI.

🤖 Generated with Claude Code

…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>
@hydall
hydall merged commit da44ec6 into nightly Sep 6, 2026
3 checks passed
@hydall
hydall deleted the fix/catalog-definition-into-description branch September 6, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant