mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2297] [Issue]: ST chat (JSONL) import defaults to "conversation" mode instead of "roleplay" #1133
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Romuromylus on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2297
Originally assigned to: @Xelvanis on GitHub.
Summary
Importing a SillyTavern chat transcript (
.jsonl) on the refactor creates the chat inconversationmode, where the main web app created it inroleplaymode. Because the chat sidebar filters by mode tab, the imported transcript shows up under the wrong tab and continues with the wrong generation pipeline.Expected behavior
A single-file ST JSONL import should default to
roleplaymode (SillyTavern is a roleplay tool), matching main. The imported chat should appear under the Roleplay tab and continue with the roleplay prompt assembly/pipeline.Actual behavior
The standalone single-file import path defaults the new chat to
conversation. The imported transcript appears only under the Conversation tab, is invisible under Roleplay where the user expects it, and runs the conversation-mode pipeline when continued. The misclassification is silent; message data itself is preserved and the mode is user-correctable after the fact.Steps to reproduce
.jsonl.Impact area
Environment
f56a3774(compared against main @b4ab97fb)Logs, screenshots, or video
Not applicable (identified via source comparison).
Regression notes
This worked in main; the refactor changed the default.
packages/server/src/services/import/st-chat.importer.ts:199defaultsmode: (opts?.mode ?? "roleplay") as ChatMode. The single-file routepackages/server/src/routes/import.routes.ts:465-469passes no mode, and the bulk paths (st-bulk.importer.ts:675,:714) also resolve toroleplay, so main is consistentlyroleplay.src-tauri/src/commands/storage/imports/bulk_imports.rs:929-930doeschat.entry("mode").or_insert(Value::String("conversation")). On the standalone single-file path (import_st_chat, ~lines 1010-1028)inheritedisNone, so the empty object falls through to theconversationdefault. The UI callers (src/shared/api/import-api.ts:96-100, and the Settings import trigger) pass no mode. Note the refactor's own bulk paths (bulk_imports.rs:1445,:1502) pre-setroleplay, so the single-file and bulk paths disagree internally.ChatSidebar.tsx:276filters chats bychat.mode === activeTab, so a transcript imported asconversationis hidden under the Roleplay tab.Additional context
Suggested direction: change the standalone single-file default in
bulk_imports.rs:929-930toroleplayso it matches main and the refactor's own bulk paths, or thread an explicit mode from the import UI. This is on the primary single-file import path, so it affects essentially every plain ST transcript import.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: