Adding tags field to personas and lorebooks & filter with tags, sort with date and aphabetically - #77
Open
rppavan wants to merge 6 commits into
Open
Adding tags field to personas and lorebooks & filter with tags, sort with date and aphabetically#77rppavan wants to merge 6 commits into
rppavan wants to merge 6 commits into
Conversation
Express/Vertex image generation rejected the responseFormat.image.aspectRatio field added in 4bfb98e (400 INVALID_ARGUMENT); it expects imageConfig.aspectRatio instead. Split the shared payload builder so each Gemini surface gets the field shape it actually supports. Also, Gemini omits `parts` entirely when it hard-blocks image generation (e.g. finishReason=IMAGE_PROHIBITED_CONTENT), which made parsing fail with a generic "missing field `parts`" instead of surfacing the finishMessage. Tested: cargo test --lib image_generator::provider_adapter::google_gemini (4/4 pass), cargo build --lib clean. By apparao.parwatikar
Adds a `tags` field (JSON array in a nullable TEXT column) to Personas and Lorebooks end-to-end, mirroring the existing Character.tags, so a later Library sort/filter feature can enable them via one seam. - DB migration v80 + fresh-install schema (personas.tags, lorebooks.tags) - Rust storage: persona read/write across all 4 JSON sites; lorebook struct + from_row + upsert; group-chat lorebook row-mappers carry tags - TS: PersonaSchema/LorebookSchema + savePersona/saveLorebook builders - Shared TagsInput component + parseCommaSeparated util (characters refactored onto them) - Persona create & edit forms; lorebook metadata menu (retitled "Edit lorebook"); fix: preserve tags on library quick-rename - i18n keys Deferred (documented): tags do not propagate through export/import, backup/restore, or entity-transfer/sync paths (non-breaking). By apparao.parwatikar
Adds a Recent/A–Z sort toggle (URL-persisted) and a faceted tag-filter chip row to the Library page. - Pure, Vitest-tested pipeline module (libraryPipeline.ts): tagKey normalization, scope, AND-filter, faceting (counts from filtered, display casing from scoped), Recent/Alphabetical sort, visibility rule, and tab-switch prune - LibraryPage wiring: useMemo chain, sort toggle, tag chip row with counts, filtered-empty state. Tag filter applies only where the chip row is visible; TAGGABLE_TYPES seam keeps it characters-only, one line from enabling personas/lorebooks - Vitest runner added (24 pure-function unit tests); i18n keys By apparao.parwatikar
Contributor
|
Hey, thanks for working on this. the feature looks good overall, but there are a few things we need to fix before merging:
|
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.
Personas and lorebooks can now carry tags, matching the existing Character.tags. Tags are stored as a JSON array in a nullable TEXT column and edited in the persona create/edit forms and the lorebook metadata sheet. Adds organization controls to the Library: a sort toggle (Recent / A–Z, URL-persisted) and a faceted tag-filter chip row. To make tag filtering meaningful across the whole Library, this also gives personas and lorebooks a tags field (characters already had one).
Tags for personas & lorebooks (groundwork)
Library sorting + tag filtering