[PR #59] [MERGED] feat: extract hidden definitions from JanitorAI characters #4427

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

📋 Pull Request Information

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

Base: main ← Head: feature/janitor-extract-hidden-definitions


📝 Commits (1)

  • 84a6df0 feat: extract hidden definitions from JanitorAI characters

📊 Changes

2 files changed (+417 additions, -21 deletions)

View changed files

📝 packages/client/src/components/bot-browser/BotBrowserView.tsx (+162 -21)
📝 packages/server/src/routes/bot-browser.routes.ts (+255 -0)

📄 Description

What this does

Adds the ability to extract hidden character definitions (personality, scenario, example dialogs, first message) from JanitorAI characters where the creator has hidden them.

How it works

  1. When viewing a JanitorAI character with hidden definitions, a "🔓 Extract Hidden Definitions" button appears
  2. Clicking it shows a warning that this will trigger one AI generation on the user's JanitorAI account
  3. On confirm, the server:
    • Creates a temporary chat with the character
    • Sends a message to trigger the correct payload
    • JanitorAI's server assembles the full system prompt (including hidden definitions) and returns it
    • Parses the system prompt to extract personality, scenario, example dialogs
    • Deletes the temporary chat
  4. The extracted definitions are displayed in the character detail view

⚠️ Important

  • Requires the user to be logged into JanitorAI
  • Uses one AI generation — the warning modal makes this clear
  • Users should set their JanitorAI API to a free/dummy key to avoid spending tokens

Files changed

  • packages/server/src/routes/bot-browser.routes.ts — new POST /janitor/extract-definitions/:id route
  • packages/client/src/components/bot-browser/BotBrowserView.tsx — extract button, warning modal, and display of extracted definitions in DetailView

Session expiry fix

Also includes the previously discussed session expiry detection — when server sessions expire, the client now detects it and shows a toast notification instead of staying in a stale logged-in state.


🔄 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/59 **Author:** [@LukaTheHero](https://github.com/LukaTheHero) **Created:** 4/5/2026 **Status:** ✅ Merged **Merged:** 4/5/2026 **Merged by:** [@LukaTheHero](https://github.com/LukaTheHero) **Base:** `main` ← **Head:** `feature/janitor-extract-hidden-definitions` --- ### 📝 Commits (1) - [`84a6df0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/84a6df08c399409501e5e78d115f981fe51b6f63) feat: extract hidden definitions from JanitorAI characters ### 📊 Changes **2 files changed** (+417 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/bot-browser/BotBrowserView.tsx` (+162 -21) 📝 `packages/server/src/routes/bot-browser.routes.ts` (+255 -0) </details> ### 📄 Description ## What this does Adds the ability to extract hidden character definitions (personality, scenario, example dialogs, first message) from JanitorAI characters where the creator has hidden them. ## How it works 1. When viewing a JanitorAI character with hidden definitions, a "🔓 Extract Hidden Definitions" button appears 2. Clicking it shows a warning that this will trigger one AI generation on the user's JanitorAI account 3. On confirm, the server: - Creates a temporary chat with the character - Sends a message to trigger the correct payload - JanitorAI's server assembles the full system prompt (including hidden definitions) and returns it - Parses the system prompt to extract personality, scenario, example dialogs - Deletes the temporary chat 4. The extracted definitions are displayed in the character detail view ## ⚠️ Important - Requires the user to be logged into JanitorAI - Uses one AI generation — the warning modal makes this clear - Users should set their JanitorAI API to a free/dummy key to avoid spending tokens ## Files changed - `packages/server/src/routes/bot-browser.routes.ts` — new `POST /janitor/extract-definitions/:id` route - `packages/client/src/components/bot-browser/BotBrowserView.tsx` — extract button, warning modal, and display of extracted definitions in DetailView ## Session expiry fix Also includes the previously discussed session expiry detection — when server sessions expire, the client now detects it and shows a toast notification instead of staying in a stale logged-in state. --- <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:31 +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#4427
No description provided.