fix(app): show one /exit row with /quit and /q as aliases
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user