[PR #69] [MERGED] Allow marinara lorebooks to be imported from lorebook import modal #4437

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/69
Author: @amauragis
Created: 4/7/2026
Status: ✅ Merged
Merged: 4/7/2026
Merged by: @SpicyMarinara

Base: main ← Head: lorebook-import


📝 Commits (1)

  • 770764e fix: detect marinara lorebooks on lorebook import modal and use correct api endpoint

📊 Changes

1 file changed (+9 additions, -5 deletions)

View changed files

📝 packages/client/src/components/modals/ImportLorebookModal.tsx (+9 -5)

📄 Description

This change is to support importing marinara-style lorebooks via the lorebook modal import by dynamically selecting the appropriate API endpoint based on the file content.

Lorebook import improvements:

  • The import logic now detects if the uploaded file is a Marinara lorebook (by checking for type === "marinara_lorebook" and version === 1) and sends it to the /api/import/marinara endpoint; otherwise, it uses the existing /api/import/st-lorebook endpoint.
  • The fallback filename is only added to non-Marinara lorebooks to avoid unnecessary data for Marinara files.

🔄 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/69 **Author:** [@amauragis](https://github.com/amauragis) **Created:** 4/7/2026 **Status:** ✅ Merged **Merged:** 4/7/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `lorebook-import` --- ### 📝 Commits (1) - [`770764e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/770764e2c1fda89a6045ce764465edbb8bd7952b) fix: detect marinara lorebooks on lorebook import modal and use correct api endpoint ### 📊 Changes **1 file changed** (+9 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/modals/ImportLorebookModal.tsx` (+9 -5) </details> ### 📄 Description This change is to support importing marinara-style lorebooks via the lorebook modal import by dynamically selecting the appropriate API endpoint based on the file content. **Lorebook import improvements:** * The import logic now detects if the uploaded file is a Marinara lorebook (by checking for `type === "marinara_lorebook"` and `version === 1`) and sends it to the `/api/import/marinara` endpoint; otherwise, it uses the existing `/api/import/st-lorebook` endpoint. * The fallback filename is only added to non-Marinara lorebooks to avoid unnecessary data for Marinara files. --- <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:35 +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#4437
No description provided.