Initial commit

This commit is contained in:
2026-09-22 17:02:10 -04:00
commit 47abbc3cad
5 changed files with 821 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import smartypants from './smartypants.js';
// attr: 1 = do everything (quotes, em-dashes, ellipses)
const SMARTY_ATTR = '1';
const { messageFormatter } = SillyTavern.getContext();
messageFormatter.addHook((mes, ctx) => {
if (ctx.isUser) return mes;
return smartypants(mes, SMARTY_ATTR);
}, {
stage: messageFormatter.stage.AFTER_MARKDOWN,
order: messageFormatter.order.NORMAL,
});