mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
handle fuzzy-matched part in empty auto-complete
This commit is contained in:
@ -2052,6 +2052,9 @@ export function setNewSlashCommandAutoComplete(textarea, isFloating = false) {
|
||||
case 'fuzzy': {
|
||||
const matched = name.replace(fuzzyRegex, (_, ...parts)=>{
|
||||
parts.splice(-2, 2);
|
||||
if (parts.length == 2) {
|
||||
return parts.join('');
|
||||
}
|
||||
return parts.map((it, idx)=>{
|
||||
if (it === null || it.length == 0) return '';
|
||||
if (idx % 2 == 1) {
|
||||
|
Reference in New Issue
Block a user