[GH-ISSUE #1806] [Issue]: SillyTavern bulk import loses preset folders and chat/group metadata #886

Closed
opened 2026-10-21 05:22:57 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @cha1latte on GitHub.

Summary

SillyTavern bulk import on the refactor branch appears to have lost several behaviors from the legacy importer: normal ST preset folders are not scanned, imported one-on-one chats are no longer linked/grouped to matching characters, group chats lose member/speaker metadata, and chat message timestamps/display text are not preserved.

This came from static parity review of the import implementation, not a live app repro.

Expected behavior

SillyTavern bulk import should preserve the important import behavior that the legacy importer supported:

  • Scan presets from ST TextGen Settings and OpenAI Settings folders.
  • Link imported one-on-one chats to matching character cards by folder/card name when possible.
  • Keep imported chat branches grouped by source character/folder and preserve the source file/branch label.
  • Use ST group metadata from groups/*.json and group chats/* to preserve group members, speaker-to-character attribution, and roleplay/group mode behavior.
  • Preserve useful ST transcript fields such as send_date ordering and extra.display_text content.

Actual behavior

Current refactor evidence suggests:

  • src-tauri/src/commands/storage/imports/bulk_imports.rs scans only data_dir.join("presets") for presets, so common ST preset folders can be missed.
  • Bulk chat import calls import_st_chat_text without the legacy name/file character map, branchName, or shared groupId behavior.
  • Bulk group chat scan lists files from group chats directly and sets members to an empty array, then imports those files like plain chats.
  • Current chat import builds message content from mes/content and role fields, but does not appear to preserve ST send_date or extra.display_text.

Steps to reproduce

  1. Inspect src-tauri/src/commands/storage/imports/bulk_imports.rs in the refactor branch.
  2. Compare preset scan paths against the legacy importer behavior for TextGen Settings and OpenAI Settings.
  3. Compare the refactor chat/group-chat bulk import path with legacy behavior that built a character name/file map, grouped imported chat branches, read group metadata, and passed speaker maps into chat import.
  4. Optionally verify in-app with a SillyTavern profile containing custom presets under TextGen Settings/OpenAI Settings, one-on-one chats under character folders, and group chats with groups/*.json metadata.

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: refactor checkout around 84f40efd
  • Run mode: not run; static code audit only
  • OS + version: not relevant for static audit
  • Node + pnpm versions: not run
  • Rust version, if relevant: not run
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: SillyTavern import path

Logs, screenshots, or video

No logs or screenshots. Static code evidence:

  • Refactor preset scan: src-tauri/src/commands/storage/imports/bulk_imports.rs
  • Refactor bulk chat/group import: src-tauri/src/commands/storage/imports/bulk_imports.rs
  • Refactor shared import wrapper: src/shared/api/import-api.ts
  • Legacy comparison points: packages/server/src/services/import/st-bulk.importer.ts and packages/server/src/services/import/st-chat.importer.ts

Regression notes

Legacy TypeScript importer scanned TextGen Settings and OpenAI Settings, built character name/file maps for chat linking, grouped imported branches, read ST group metadata, passed speaker maps for group chats, and preserved transcript timestamps/display text.

The Rust refactor also improves some safety areas, so this should not be a blind port: current rollback/path-containment behavior should be preserved.

Additional context

Suggested queue:

  1. Restore legacy-compatible preset folder scanning.
  2. Restore chat character linking and branch/group metadata during bulk import.
  3. Restore group metadata and speaker-map handling for ST group chats.
  4. Preserve send_date and extra.display_text when importing ST JSONL transcripts.
  5. Keep current refactor import safety checks around path containment, stale selections, rollback, and managed media paths.

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 @Xelvanis on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1806 Originally assigned to: @cha1latte on GitHub. ## Summary SillyTavern bulk import on the refactor branch appears to have lost several behaviors from the legacy importer: normal ST preset folders are not scanned, imported one-on-one chats are no longer linked/grouped to matching characters, group chats lose member/speaker metadata, and chat message timestamps/display text are not preserved. This came from static parity review of the import implementation, not a live app repro. ## Expected behavior SillyTavern bulk import should preserve the important import behavior that the legacy importer supported: - Scan presets from ST `TextGen Settings` and `OpenAI Settings` folders. - Link imported one-on-one chats to matching character cards by folder/card name when possible. - Keep imported chat branches grouped by source character/folder and preserve the source file/branch label. - Use ST group metadata from `groups/*.json` and `group chats/*` to preserve group members, speaker-to-character attribution, and roleplay/group mode behavior. - Preserve useful ST transcript fields such as `send_date` ordering and `extra.display_text` content. ## Actual behavior Current refactor evidence suggests: - `src-tauri/src/commands/storage/imports/bulk_imports.rs` scans only `data_dir.join("presets")` for presets, so common ST preset folders can be missed. - Bulk chat import calls `import_st_chat_text` without the legacy name/file character map, `branchName`, or shared `groupId` behavior. - Bulk group chat scan lists files from `group chats` directly and sets `members` to an empty array, then imports those files like plain chats. - Current chat import builds message content from `mes`/`content` and role fields, but does not appear to preserve ST `send_date` or `extra.display_text`. ## Steps to reproduce 1. Inspect `src-tauri/src/commands/storage/imports/bulk_imports.rs` in the refactor branch. 2. Compare preset scan paths against the legacy importer behavior for `TextGen Settings` and `OpenAI Settings`. 3. Compare the refactor chat/group-chat bulk import path with legacy behavior that built a character name/file map, grouped imported chat branches, read group metadata, and passed speaker maps into chat import. 4. Optionally verify in-app with a SillyTavern profile containing custom presets under `TextGen Settings`/`OpenAI Settings`, one-on-one chats under character folders, and group chats with `groups/*.json` metadata. ## Impact area - [x] App shell, navigation, startup, or providers - [x] Catalog resources - [x] Chat mode - [x] 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 - [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: refactor checkout around `84f40efd` - Run mode: not run; static code audit only - OS + version: not relevant for static audit - Node + pnpm versions: not run - Rust version, if relevant: not run - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: SillyTavern import path ## Logs, screenshots, or video No logs or screenshots. Static code evidence: - Refactor preset scan: `src-tauri/src/commands/storage/imports/bulk_imports.rs` - Refactor bulk chat/group import: `src-tauri/src/commands/storage/imports/bulk_imports.rs` - Refactor shared import wrapper: `src/shared/api/import-api.ts` - Legacy comparison points: `packages/server/src/services/import/st-bulk.importer.ts` and `packages/server/src/services/import/st-chat.importer.ts` ## Regression notes Legacy TypeScript importer scanned `TextGen Settings` and `OpenAI Settings`, built character name/file maps for chat linking, grouped imported branches, read ST group metadata, passed speaker maps for group chats, and preserved transcript timestamps/display text. The Rust refactor also improves some safety areas, so this should not be a blind port: current rollback/path-containment behavior should be preserved. ## Additional context Suggested queue: 1. Restore legacy-compatible preset folder scanning. 2. Restore chat character linking and branch/group metadata during bulk import. 3. Restore group metadata and speaker-map handling for ST group chats. 4. Preserve `send_date` and `extra.display_text` when importing ST JSONL transcripts. 5. Keep current refactor import safety checks around path containment, stale selections, rollback, and managed media paths. ## 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:22:57 +07:00
Author
Owner

@cha1latte commented on GitHub (Jun 1, 2026):

fixed in #1840

<!-- gh-comment-id:4595875751 --> @cha1latte commented on GitHub (Jun 1, 2026): fixed in #1840
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#886
No description provided.