Skip to content

v0.2.0

Choose a tag to compare

@paradox460 paradox460 released this 23 Jun 08:18
· 8 commits to master since this release
v0.2.0
5bb010d

Added

  • Authorship re-attribution on split: during the interactive overlay, each divider now carries a dropdown that re-attributes the resulting message below it. Pick No Change to keep the original author, the user persona, or any member of the current group (group chats only). Solo chats see the user persona option only. The underlying applyParagraphSplit accepts an optional charOverrides array ('__user__' for the user persona, an avatar filename for a character, null omitted to keep the clone's original authorship) — the slash command path continues to keep the original author.

Changed

  • Build target bumped from ES2020 to ES2022 in tsconfig.json to support the top-level await in the new src/util.ts.
  • Types refactored: the in-repo src/sillytavern.d.ts shim is gone. src/global.d.ts now imports SillyTavern core's global.d.ts directly to pull in upstream types (ChatMessage, Character, STGroup, STEventSource, …) and augments only the STContext fields this extension actually consumes, plus a declare global block for toastr. Everything that previously referenced STChatMessage now uses the upstream ChatMessage.

Internal

  • New src/util.ts: top-level-await helper that dynamic-imports default_avatar from ST's /script.js (with /* webpackIgnore: true */), used for the avatar="none" fallback during re-attribution.
  • New test/preload.ts + bunfig.toml: registers a mock.module(...) for src/util.ts so tests do not attempt to fetch /script.js at module load time.
  • Five new unit tests on applyParagraphSplit cover group-character reattribution, user-persona reattribution, null override passthrough, undefined overrides, and mixed multi-override splits.