mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1635] [MERGED] Preserve JSONL message roles and character ids #5168
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#5168
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1635
Author: @Promansis
Created: 5/30/2026
Status: ✅ Merged
Merged: 5/30/2026
Merged by: @Promansis
Base:
refactor← Head:fix/issue-1524-jsonl-avatar-context📝 Commits (2)
1da2497Preserve JSONL message character idsd8fd5b8Preserve JSONL message roles📊 Changes
1 file changed (+204 additions, -8 deletions)
View changed files
📝
src-tauri/src/commands/storage/imports/bulk_imports.rs(+204 -8)📄 Description
Linked issue
Closes #1524
Why this change
Marinara JSONL chat export writes stored message rows as-is, including each row's
roleandcharacterId, but the JSONL/ST importer discarded that local context. Imported Marinara JSONL user rows could become assistant messages because the importer only looked at ST'sis_userflag, and imported messages always lostcharacterId.What changed
user,assistant,system, andnarrator.is_userfallback and default assistant behavior.characterIdstrings are preserved on imported messages.characterIds, preserving existing inherited chat links when present.character_namerows remain transcript-only and are not guessed into local character links.character_namenegative control.Refactor impact
Primary owner:
Impact areas reviewed:
roleandcharacterId.Boundary notes:
character_nameis not a stable local character identity.Pressure points touched:
src-tauri/src/commands/storage/imports/bulk_imports.rsValidation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
cargo check --manifest-path src-tauri/Cargo.tomlcargo test --manifest-path src-tauri/Cargo.toml import_st_chat_textcargo fmt --manifest-path src-tauri/Cargo.toml --checkwas attempted, but the repository currently has unrelated rustfmt drift in other files. The touched importer hunks were manually aligned andgit diff --checkpasses.Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
Not applicable; this is Rust import behavior.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.