fix: remove shuffle macro
This commit is contained in:
80
dist/index.js
vendored
80
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,9 +1,7 @@
|
|||||||
import { setupRandomWordMacros } from '@/services/randomWord'
|
import { setupRandomWordMacros } from '@/services/randomWord'
|
||||||
import { setupShuffleMacros } from '@/services/shuffle'
|
|
||||||
|
|
||||||
const initializeMacros = () => {
|
const initializeMacros = () => {
|
||||||
setupRandomWordMacros()
|
setupRandomWordMacros()
|
||||||
setupShuffleMacros()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default initializeMacros
|
export default initializeMacros
|
||||||
|
|||||||
@@ -13,15 +13,6 @@ const fishersYatesShuffle = <Type>(arr: Type[]): Type[] => {
|
|||||||
return shuffled
|
return shuffled
|
||||||
}
|
}
|
||||||
|
|
||||||
export const setupShuffleMacros = () => {
|
|
||||||
const { registerMacro } = SillyTavern.getContext()
|
|
||||||
registerMacro(
|
|
||||||
'placeholder::shuffle',
|
|
||||||
'%%shuffle::option1::option2;;separator%%',
|
|
||||||
'Returns a Shuffle placeholder'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const shufflePlaceholderRegex = /%%shuffle::([\w\W]*?)(;;[\w\W]*?)?%%/g
|
const shufflePlaceholderRegex = /%%shuffle::([\w\W]*?)(;;[\w\W]*?)?%%/g
|
||||||
|
|
||||||
export const setupShufflePlaceholders = () => {
|
export const setupShufflePlaceholders = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user