Improve altName completion behavior in slash commands (#4227)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
Lee Won Jun
2025-07-16 08:45:10 +09:00
committed by GitHub
parent 615748657a
commit ec5e9d1025
3 changed files with 63 additions and 12 deletions

View File

@@ -221,7 +221,7 @@ export function useCompletion(
// enter should submit immediately.
if (potentialSuggestions.length > 0 && !hasTrailingSpace) {
const perfectMatch = potentialSuggestions.find(
(s) => s.name === partial,
(s) => s.name === partial || s.altName === partial,
);
if (perfectMatch && !perfectMatch.subCommands) {
potentialSuggestions = [];