mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Limit slash autocomplete
This commit is contained in:
@ -1833,7 +1833,7 @@ function setSlashCommandAutocomplete(textarea) {
|
||||
.keys(parser.helpStrings) // Get all slash commands
|
||||
.filter(x => x.startsWith(slashCommand)) // Filter by the input
|
||||
.sort((a, b) => a.localeCompare(b)) // Sort alphabetically
|
||||
// .slice(0, 20) // Limit to 20 results
|
||||
.slice(0, 5) // Limit to 5 results
|
||||
.map(x => ({ label: parser.helpStrings[x], value: `/${x} ` })); // Map to the help string
|
||||
|
||||
output(result); // Return the results
|
||||
|
Reference in New Issue
Block a user