[GH-ISSUE #2002] [Issue]: SillyTavern JSONL import drops hidden messages and loses chat avatars #981

Closed
opened 2026-10-21 05:24:45 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2002

Originally assigned to: @cha1latte on GitHub.

Summary

SillyTavern JSONL chat import currently skips rows marked is_system, which drops hidden/system transcript messages instead of preserving them as Marinara hidden messages. Name-only SillyTavern rows also do not reliably link imported assistant messages to matching character records, so character avatars can be missing in the imported chat.

Expected behavior

When importing SillyTavern JSONL chat history:

  • Rows marked as hidden/system in SillyTavern should be imported as chat messages, not dropped.
  • Those messages should be marked hidden from AI in Marinara, e.g. extra.hiddenFromAI / extra.hiddenFromAi, while remaining available in the transcript/history UI as hidden messages.
  • Assistant/narrator rows with SillyTavern speaker fields such as name, character_name, or extra.name should resolve to matching imported/existing Marinara character IDs when possible so the chat can render the correct character avatar.

Actual behavior

The importer excludes rows where is_system is true before both the importability check and message creation. It also has an explicit test expectation that SillyTavern character_name alone does not link transcript rows to character records, which can leave imported messages without character IDs and therefore without character avatars in chat.

Steps to reproduce

  1. Export or prepare a SillyTavern .jsonl chat containing at least one row with is_system: true and text in mes.
  2. Include assistant rows whose speaker is represented by SillyTavern name fields, such as character_name or name, and make sure the corresponding character exists or is imported in the same bulk import.
  3. Import the JSONL chat into Marinara Engine.
  4. Open the imported chat.
  5. Compare the message list and avatars with the source SillyTavern transcript.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: upstream main as inspected on 2026-06-03
  • Run mode: not captured; issue filed from source inspection plus user report
  • OS + version: not captured
  • Node + pnpm versions: not captured
  • Rust version, if relevant: not captured
  • Remote Runtime URL configured? unknown
  • Provider, model, or integration, if relevant: SillyTavern JSONL import

Logs, screenshots, or video

No screenshot attached. Source evidence from src-tauri/src/commands/storage/imports/bulk_imports.rs:

  • import_st_chat_text ignores rows with is_system == true when checking for importable messages.
  • The same function continues past is_system == true rows during message creation.
  • Imported hidden flags are not converted into Marinara message extra.hiddenFromAI / extra.hiddenFromAi for those skipped rows.
  • import_st_chat_text_does_not_link_character_name_only_rows currently asserts that a row with only character_name has no characterId, which can explain missing avatars in imported transcripts.

Related historical context: closed #1524 / merged #1635 covered JSONL role and character ID preservation, but this current report is about SillyTavern hidden/system rows and SillyTavern name-only avatar linkage in the current import path.

Regression notes

Not confirmed as a regression. The behavior appears present in the current SillyTavern import implementation.

Additional context

Suggested repair:

  • Treat SillyTavern hidden/system transcript rows as importable when they contain message text.
  • Preserve the message content and role, but set Marinara hidden-from-AI flags in extra.
  • Resolve speaker names to character IDs for SillyTavern rows when the name uniquely matches the imported/existing character lookup, while keeping ambiguous names unlinked rather than guessing.
  • Add focused Rust coverage for is_system preservation and avatar/characterId resolution during SillyTavern JSONL import.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Jun 3, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2002 Originally assigned to: @cha1latte on GitHub. ## Summary SillyTavern JSONL chat import currently skips rows marked `is_system`, which drops hidden/system transcript messages instead of preserving them as Marinara hidden messages. Name-only SillyTavern rows also do not reliably link imported assistant messages to matching character records, so character avatars can be missing in the imported chat. ## Expected behavior When importing SillyTavern JSONL chat history: - Rows marked as hidden/system in SillyTavern should be imported as chat messages, not dropped. - Those messages should be marked hidden from AI in Marinara, e.g. `extra.hiddenFromAI` / `extra.hiddenFromAi`, while remaining available in the transcript/history UI as hidden messages. - Assistant/narrator rows with SillyTavern speaker fields such as `name`, `character_name`, or `extra.name` should resolve to matching imported/existing Marinara character IDs when possible so the chat can render the correct character avatar. ## Actual behavior The importer excludes rows where `is_system` is true before both the importability check and message creation. It also has an explicit test expectation that SillyTavern `character_name` alone does not link transcript rows to character records, which can leave imported messages without character IDs and therefore without character avatars in chat. ## Steps to reproduce 1. Export or prepare a SillyTavern `.jsonl` chat containing at least one row with `is_system: true` and text in `mes`. 2. Include assistant rows whose speaker is represented by SillyTavern name fields, such as `character_name` or `name`, and make sure the corresponding character exists or is imported in the same bulk import. 3. Import the JSONL chat into Marinara Engine. 4. Open the imported chat. 5. Compare the message list and avatars with the source SillyTavern transcript. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [x] Chat mode - [x] Roleplay mode - [x] Game mode - [x] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: upstream `main` as inspected on 2026-06-03 - Run mode: not captured; issue filed from source inspection plus user report - OS + version: not captured - Node + pnpm versions: not captured - Rust version, if relevant: not captured - Remote Runtime URL configured? unknown - Provider, model, or integration, if relevant: SillyTavern JSONL import ## Logs, screenshots, or video No screenshot attached. Source evidence from `src-tauri/src/commands/storage/imports/bulk_imports.rs`: - `import_st_chat_text` ignores rows with `is_system == true` when checking for importable messages. - The same function `continue`s past `is_system == true` rows during message creation. - Imported hidden flags are not converted into Marinara message `extra.hiddenFromAI` / `extra.hiddenFromAi` for those skipped rows. - `import_st_chat_text_does_not_link_character_name_only_rows` currently asserts that a row with only `character_name` has no `characterId`, which can explain missing avatars in imported transcripts. Related historical context: closed #1524 / merged #1635 covered JSONL role and character ID preservation, but this current report is about SillyTavern hidden/system rows and SillyTavern name-only avatar linkage in the current import path. ## Regression notes Not confirmed as a regression. The behavior appears present in the current SillyTavern import implementation. ## Additional context Suggested repair: - Treat SillyTavern hidden/system transcript rows as importable when they contain message text. - Preserve the message content and role, but set Marinara hidden-from-AI flags in `extra`. - Resolve speaker names to character IDs for SillyTavern rows when the name uniquely matches the imported/existing character lookup, while keeping ambiguous names unlinked rather than guessing. - Add focused Rust coverage for `is_system` preservation and avatar/characterId resolution during SillyTavern JSONL import. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:24:45 +07:00
  • closed this issue
  • added the
    bug
    label
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#981
No description provided.