mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-24 07:39:27 +01:00
refac
This commit is contained in:
@@ -29,15 +29,6 @@
|
||||
selectedIdx = 0;
|
||||
}
|
||||
|
||||
type ObjectWithName = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
const findByName = (obj: ObjectWithName, command: string) => {
|
||||
const name = obj.name.toLowerCase();
|
||||
return name.includes(command.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '');
|
||||
};
|
||||
|
||||
export const selectUp = () => {
|
||||
selectedIdx = Math.max(0, selectedIdx - 1);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user