mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
73f8237d43
commit
b0279c5090
1 changed files with 25 additions and 4 deletions
|
|
@ -130,7 +130,14 @@
|
|||
name: 'false',
|
||||
type: 'pinned'
|
||||
}
|
||||
];
|
||||
].filter((item) => {
|
||||
const pinnedValue = lastWord.slice(7);
|
||||
if (pinnedValue) {
|
||||
return item.id.startsWith(pinnedValue) && item.id !== pinnedValue;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
} else if (lastWord.startsWith('shared:')) {
|
||||
filteredItems = [
|
||||
{
|
||||
|
|
@ -143,7 +150,14 @@
|
|||
name: 'false',
|
||||
type: 'shared'
|
||||
}
|
||||
];
|
||||
].filter((item) => {
|
||||
const sharedValue = lastWord.slice(7);
|
||||
if (sharedValue) {
|
||||
return item.id.startsWith(sharedValue) && item.id !== sharedValue;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
} else if (lastWord.startsWith('archived:')) {
|
||||
filteredItems = [
|
||||
{
|
||||
|
|
@ -156,7 +170,14 @@
|
|||
name: 'false',
|
||||
type: 'archived'
|
||||
}
|
||||
];
|
||||
].filter((item) => {
|
||||
const archivedValue = lastWord.slice(9);
|
||||
if (archivedValue) {
|
||||
return item.id.startsWith(archivedValue) && item.id !== archivedValue;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
filteredItems = [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue