mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-22 23:18:27 +01:00
Limit slash autocomplete
This commit is contained in:
parent
39b305621e
commit
41a4de7224
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user