fix(app): show one /exit row with /quit and /q as aliases

This commit is contained in:
Mohamed Boudra
2026-05-22 18:22:19 +07:00
parent 8e0ebfcaaa
commit f5f1ae7fa9
4 changed files with 46 additions and 46 deletions
@@ -324,9 +324,13 @@ export function useAgentAutocomplete(input: UseAgentAutocompleteInput): AgentAut
),
...providerCommands,
];
const matches = availableCommands.filter((entry) =>
entry.command.name.toLowerCase().includes(filterLower),
);
const matches = availableCommands.filter((entry) => {
if (entry.source === "provider") {
return entry.command.name.toLowerCase().includes(filterLower);
}
const candidates = [entry.command.name, ...entry.command.aliases];
return candidates.some((candidate) => candidate.toLowerCase().includes(filterLower));
});
const orderedMatches = orderAutocompleteOptions(matches);
return orderedMatches.map(mapCommandToOption);
}