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
bafeb76c41
commit
a8fe979cf8
1 changed files with 4 additions and 4 deletions
|
|
@ -76,7 +76,7 @@
|
||||||
.filter((tag) => {
|
.filter((tag) => {
|
||||||
const tagName = lastWord.slice(4);
|
const tagName = lastWord.slice(4);
|
||||||
if (tagName) {
|
if (tagName) {
|
||||||
const tagId = tagName.replace(' ', '_').toLowerCase();
|
const tagId = tagName.replaceAll(' ', '_').toLowerCase();
|
||||||
|
|
||||||
if (tag.id !== tagId) {
|
if (tag.id !== tagId) {
|
||||||
return tag.id.startsWith(tagId);
|
return tag.id.startsWith(tagId);
|
||||||
|
|
@ -99,8 +99,8 @@
|
||||||
.filter((folder) => {
|
.filter((folder) => {
|
||||||
const folderName = lastWord.slice(7);
|
const folderName = lastWord.slice(7);
|
||||||
if (folderName) {
|
if (folderName) {
|
||||||
const id = folder.name.replace(' ', '_').toLowerCase();
|
const id = folder.name.replaceAll(' ', '_').toLowerCase();
|
||||||
const folderId = folderName.replace(' ', '_').toLowerCase();
|
const folderId = folderName.replaceAll(' ', '_').toLowerCase();
|
||||||
|
|
||||||
if (id !== folderId) {
|
if (id !== folderId) {
|
||||||
return id.startsWith(folderId);
|
return id.startsWith(folderId);
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
})
|
})
|
||||||
.map((folder) => {
|
.map((folder) => {
|
||||||
return {
|
return {
|
||||||
id: folder.name.replace(' ', '_').toLowerCase(),
|
id: folder.name.replaceAll(' ', '_').toLowerCase(),
|
||||||
name: folder.name,
|
name: folder.name,
|
||||||
type: 'folder'
|
type: 'folder'
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue