[PR #54] [MERGED] feat: Multi-Provider Character Browser with 5 Sources, Auth, Tags, Filters & Pagination #4421

Closed
opened 2026-10-22 04:07:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/54
Author: @LukaTheHero
Created: 4/4/2026
Status: ✅ Merged
Merged: 4/4/2026
Merged by: @LukaTheHero

Base: main ← Head: luka-character-browser


📝 Commits (1)

  • fe8448f feat: multi-provider character browser with ChubAI, JannyAI, CharacterTavern, Pygmalion, Wyvern

📊 Changes

7 files changed (+2109 additions, -381 deletions)

View changed files

📝 packages/client/src/components/bot-browser/BotBrowserView.tsx (+1215 -367)
➕ packages/server/src/routes/bot-browser-chartavern.routes.ts (+282 -0)
➕ packages/server/src/routes/bot-browser-janny.routes.ts (+150 -0)
➕ packages/server/src/routes/bot-browser-pygmalion.routes.ts (+250 -0)
➕ packages/server/src/routes/bot-browser-wyvern.routes.ts (+132 -0)
📝 packages/server/src/routes/bot-browser.routes.ts (+72 -14)
📝 packages/server/src/routes/index.ts (+8 -0)

📄 Description

🌐 Multi-Provider Character Browser

Completely rebuilt the Bot Browser from a single-source ChubAI-only search with no filters into a full-featured multi-provider character browsing experience with 5 character sources, authentication, tag filtering, and provider-specific options.

Before

  • Only ChubAI supported
  • No tag filtering (whitelist or blacklist)
  • No feature filters (lorebook, gallery, expressions, etc.)
  • No sort direction toggle
  • No token range filters
  • No NSFW toggle
  • No pagination (or broken pagination)
  • Sort options didn't actually produce different results (API params were wrong)
  • Single basic search bar, that's it

After

🔌 5 Character Providers

Switch between providers seamlessly — each with their own sort options, filters, and features:

Provider Sort Options Features NSFW Auth
ChubAI Most Downloaded, Hot This Week/Month, Top Rated, Newest, Recently Updated, Recent Hits, Random Image Gallery, Lorebook, Expressions, Alt Greetings, Sort Direction, Min/Max Tokens ✅ Free —
JannyAI Newest, Oldest, Most/Least Tokens, Relevance Show Low Quality toggle, Min/Max Tokens ✅ Free —
CharacterTavern Most Popular, Trending, Newest, Oldest, Most Liked Lorebook, Original Character toggle, Min/Max Tokens 🔒 Login Cookie session
Pygmalion Downloads, Stars, Views, Newest, Tokens, Name Sort Direction 🔒 Login Email/Password
Wyvern Popular, Popular NSFW, Recommended, New, Most Likes, Most Messages Lorebook, Alt Greetings, Min/Max Tokens 🔞 Use sort —

🏷️ Tag System (Whitelist & Blacklist)

  • Whitelist (Include): Click the green ✓ checkbox to require a tag
  • Blacklist (Exclude): Click the red − button to block a tag from results
  • Custom tags: Type any tag name and either "Add as filter" (whitelist) or "Block from results" (blacklist)
  • Tags are collected from search results and grow as you browse
  • Active tags shown as colored pills at the top of the sidebar
  • Works on all 5 providers (server-side for ChubAI/CharacterTavern/Pygmalion, client-side for JannyAI/Wyvern)

🔐 Authentication for NSFW Content

  • Pygmalion: Email/password login modal → authenticates via Pygmalion's auth endpoint → enables NSFW search with includeSensitive flag
  • CharacterTavern: Cookie-paste login modal → stores session cookie server-side → proxies authenticated requests for NSFW results → validates cookie on connect
  • Wyvern: No login needed — use the "🔞 Popular NSFW" sort option
  • ChubAI & JannyAI: NSFW toggle works freely without login
  • Greyed-out NSFW button with informative tooltips and toasts for providers requiring login
  • "Logged in" / "Session active" indicators in the header
  • "NSFW depends on your account settings" text after login
  • Logout support for both Pygmalion and CharacterTavern

📄 Pagination

  • ChubAI uses cursor-based pagination (shows "Page X" with Next/Previous)
  • Other providers show "Page X of Y" with proper total counts
  • Next button disabled when no more results available

🔍 Provider-Specific Sort Options

Each provider's sort dropdown is dynamically built from its config — no shared/generic options that don't work. ChubAI sort presets now correctly map to the Chub API parameters:

  • download_count for popularity sorts
  • star_count for rating sorts
  • id for newest
  • last_activity_at for recently updated
  • default sort omitted to let API decide (for Recent Hits with special_mode=newcomer)
  • max_days_ago only sent for time-limited presets, NOT when searching by text

⚙️ Dynamic Filters Panel

  • Only shows filter options that the selected provider actually supports
  • Feature checkboxes (Gallery, Lorebook, Expressions, Alt Greetings)
  • Provider-specific toggles (Show Low Quality for JannyAI, Original Character for CharacterTavern)
  • Sort Direction toggle (Ascending/Descending) for ChubAI and Pygmalion
  • Min/Max Token range filters

📥 Import

  • ChubAI & CharacterTavern: PNG-based import with embedded V2 card data and avatar
  • JannyAI, Pygmalion, Wyvern: API-based import — fetches character detail, builds V2 card JSON, downloads avatar separately
  • All imports go through the existing ST character import pipeline

🖼️ Character Detail View

  • Full character preview with avatar, stats, tags, and creator info
  • "View on [Provider]" external link
  • Definition sections: Description, Personality, Scenario, First Message, Example Dialogs, Alternate Greetings, Lorebook indicator
  • Provider-specific stat display (Downloads/Stars/Chats for Pygmalion, Likes/Messages/Views for Wyvern, etc.)

Server Changes

New Route Files

  • bot-browser-janny.routes.ts — Proxies to JannyAI's MeiliSearch API, handles dynamic search token retrieval, avatar proxy
  • bot-browser-chartavern.routes.ts — Proxies to CharacterTavern REST API with cookie-based auth session management (set-cookie, validate, logout, session check), avatar/card download proxy
  • bot-browser-pygmalion.routes.ts — Proxies to Pygmalion's Connect RPC API with token-based auth (login via auth.pygmalion.chat, set-token, logout, session check), authenticated POST search for NSFW, avatar proxy
  • bot-browser-wyvern.routes.ts — Proxies to Wyvern REST API, user search, creator character listing, avatar proxy

Modified Files

  • bot-browser.routes.ts — Fixed ChubAI search parameter mapping (sort, max_days_ago, special_mode, nsfl, include_forks, venus params now match the working SillyTavern plugin implementation)
  • index.ts — Registers all 4 new provider route files

Screenshots

[Add your screenshots here]

Testing

Tested all 5 providers:

  • ✅ ChubAI — search, sort presets, tag whitelist/blacklist, feature filters, pagination, detail view, import
  • ✅ JannyAI — search, sort, tags (with numeric ID reverse mapping), NSFW toggle, import
  • ✅ CharacterTavern — search, sort, tags, cookie login for NSFW, lorebook filter, import
  • ✅ Pygmalion — search, sort, tags, email/password login for NSFW, sort direction, import
  • ✅ Wyvern — search, sort, tags, Popular NSFW sort, lorebook/greetings filters, import

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/54 **Author:** [@LukaTheHero](https://github.com/LukaTheHero) **Created:** 4/4/2026 **Status:** ✅ Merged **Merged:** 4/4/2026 **Merged by:** [@LukaTheHero](https://github.com/LukaTheHero) **Base:** `main` ← **Head:** `luka-character-browser` --- ### 📝 Commits (1) - [`fe8448f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fe8448f5fe42e0b13a45497d31eb1b9716b1671c) feat: multi-provider character browser with ChubAI, JannyAI, CharacterTavern, Pygmalion, Wyvern ### 📊 Changes **7 files changed** (+2109 additions, -381 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/bot-browser/BotBrowserView.tsx` (+1215 -367) ➕ `packages/server/src/routes/bot-browser-chartavern.routes.ts` (+282 -0) ➕ `packages/server/src/routes/bot-browser-janny.routes.ts` (+150 -0) ➕ `packages/server/src/routes/bot-browser-pygmalion.routes.ts` (+250 -0) ➕ `packages/server/src/routes/bot-browser-wyvern.routes.ts` (+132 -0) 📝 `packages/server/src/routes/bot-browser.routes.ts` (+72 -14) 📝 `packages/server/src/routes/index.ts` (+8 -0) </details> ### 📄 Description ## 🌐 Multi-Provider Character Browser Completely rebuilt the Bot Browser from a single-source ChubAI-only search with no filters into a full-featured multi-provider character browsing experience with 5 character sources, authentication, tag filtering, and provider-specific options. ### Before - Only ChubAI supported - No tag filtering (whitelist or blacklist) - No feature filters (lorebook, gallery, expressions, etc.) - No sort direction toggle - No token range filters - No NSFW toggle - No pagination (or broken pagination) - Sort options didn't actually produce different results (API params were wrong) - Single basic search bar, that's it ### After #### 🔌 5 Character Providers Switch between providers seamlessly — each with their own sort options, filters, and features: | Provider | Sort Options | Features | NSFW | Auth | |----------|-------------|----------|------|------| | **ChubAI** | Most Downloaded, Hot This Week/Month, Top Rated, Newest, Recently Updated, Recent Hits, Random | Image Gallery, Lorebook, Expressions, Alt Greetings, Sort Direction, Min/Max Tokens | ✅ Free | — | | **JannyAI** | Newest, Oldest, Most/Least Tokens, Relevance | Show Low Quality toggle, Min/Max Tokens | ✅ Free | — | | **CharacterTavern** | Most Popular, Trending, Newest, Oldest, Most Liked | Lorebook, Original Character toggle, Min/Max Tokens | 🔒 Login | Cookie session | | **Pygmalion** | Downloads, Stars, Views, Newest, Tokens, Name | Sort Direction | 🔒 Login | Email/Password | | **Wyvern** | Popular, Popular NSFW, Recommended, New, Most Likes, Most Messages | Lorebook, Alt Greetings, Min/Max Tokens | 🔞 Use sort | — | #### 🏷️ Tag System (Whitelist & Blacklist) - **Whitelist (Include):** Click the green ✓ checkbox to require a tag - **Blacklist (Exclude):** Click the red − button to block a tag from results - **Custom tags:** Type any tag name and either "Add as filter" (whitelist) or "Block from results" (blacklist) - Tags are collected from search results and grow as you browse - Active tags shown as colored pills at the top of the sidebar - Works on all 5 providers (server-side for ChubAI/CharacterTavern/Pygmalion, client-side for JannyAI/Wyvern) #### 🔐 Authentication for NSFW Content - **Pygmalion:** Email/password login modal → authenticates via Pygmalion's auth endpoint → enables NSFW search with `includeSensitive` flag - **CharacterTavern:** Cookie-paste login modal → stores session cookie server-side → proxies authenticated requests for NSFW results → validates cookie on connect - **Wyvern:** No login needed — use the "🔞 Popular NSFW" sort option - **ChubAI & JannyAI:** NSFW toggle works freely without login - Greyed-out NSFW button with informative tooltips and toasts for providers requiring login - "Logged in" / "Session active" indicators in the header - "NSFW depends on your account settings" text after login - Logout support for both Pygmalion and CharacterTavern #### 📄 Pagination - ChubAI uses cursor-based pagination (shows "Page X" with Next/Previous) - Other providers show "Page X of Y" with proper total counts - Next button disabled when no more results available #### 🔍 Provider-Specific Sort Options Each provider's sort dropdown is dynamically built from its config — no shared/generic options that don't work. ChubAI sort presets now correctly map to the Chub API parameters: - `download_count` for popularity sorts - `star_count` for rating sorts - `id` for newest - `last_activity_at` for recently updated - `default` sort omitted to let API decide (for Recent Hits with `special_mode=newcomer`) - `max_days_ago` only sent for time-limited presets, NOT when searching by text #### ⚙️ Dynamic Filters Panel - Only shows filter options that the selected provider actually supports - Feature checkboxes (Gallery, Lorebook, Expressions, Alt Greetings) - Provider-specific toggles (Show Low Quality for JannyAI, Original Character for CharacterTavern) - Sort Direction toggle (Ascending/Descending) for ChubAI and Pygmalion - Min/Max Token range filters #### 📥 Import - **ChubAI & CharacterTavern:** PNG-based import with embedded V2 card data and avatar - **JannyAI, Pygmalion, Wyvern:** API-based import — fetches character detail, builds V2 card JSON, downloads avatar separately - All imports go through the existing ST character import pipeline #### 🖼️ Character Detail View - Full character preview with avatar, stats, tags, and creator info - "View on [Provider]" external link - Definition sections: Description, Personality, Scenario, First Message, Example Dialogs, Alternate Greetings, Lorebook indicator - Provider-specific stat display (Downloads/Stars/Chats for Pygmalion, Likes/Messages/Views for Wyvern, etc.) ### Server Changes #### New Route Files - `bot-browser-janny.routes.ts` — Proxies to JannyAI's MeiliSearch API, handles dynamic search token retrieval, avatar proxy - `bot-browser-chartavern.routes.ts` — Proxies to CharacterTavern REST API with cookie-based auth session management (set-cookie, validate, logout, session check), avatar/card download proxy - `bot-browser-pygmalion.routes.ts` — Proxies to Pygmalion's Connect RPC API with token-based auth (login via auth.pygmalion.chat, set-token, logout, session check), authenticated POST search for NSFW, avatar proxy - `bot-browser-wyvern.routes.ts` — Proxies to Wyvern REST API, user search, creator character listing, avatar proxy #### Modified Files - `bot-browser.routes.ts` — Fixed ChubAI search parameter mapping (sort, max_days_ago, special_mode, nsfl, include_forks, venus params now match the working SillyTavern plugin implementation) - `index.ts` — Registers all 4 new provider route files ### Screenshots *[Add your screenshots here]* ### Testing Tested all 5 providers: - ✅ ChubAI — search, sort presets, tag whitelist/blacklist, feature filters, pagination, detail view, import - ✅ JannyAI — search, sort, tags (with numeric ID reverse mapping), NSFW toggle, import - ✅ CharacterTavern — search, sort, tags, cookie login for NSFW, lorebook filter, import - ✅ Pygmalion — search, sort, tags, email/password login for NSFW, sort direction, import - ✅ Wyvern — search, sort, tags, Popular NSFW sort, lorebook/greetings filters, import --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:07:29 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4421
No description provided.