mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: disable 'none' tag
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
import Tags from '../common/Tags.svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
|
||||
export let chatId = '';
|
||||
let tags = [];
|
||||
@@ -31,7 +32,14 @@
|
||||
};
|
||||
|
||||
const addTag = async (tagName) => {
|
||||
const res = await addTagById(localStorage.token, chatId, tagName);
|
||||
const res = await addTagById(localStorage.token, chatId, tagName).catch(async (error) => {
|
||||
toast.error(error);
|
||||
return null;
|
||||
});
|
||||
if (!res) {
|
||||
return;
|
||||
}
|
||||
|
||||
tags = await getTags();
|
||||
await updateChatById(localStorage.token, chatId, {
|
||||
tags: tags
|
||||
|
||||
Reference in New Issue
Block a user