forked from open-webui/open-webui
feat: save tags to chat data
This commit is contained in:
parent
987685dbf9
commit
1eec176313
4 changed files with 17 additions and 3 deletions
|
@ -707,11 +707,19 @@
|
|||
const addTag = async (tagName) => {
|
||||
const res = await addTagById(localStorage.token, $chatId, tagName);
|
||||
tags = await getTags();
|
||||
|
||||
chat = await updateChatById(localStorage.token, $chatId, {
|
||||
tags: tags.map((tag) => tag.name)
|
||||
});
|
||||
};
|
||||
|
||||
const deleteTag = async (tagName) => {
|
||||
const res = await deleteTagById(localStorage.token, $chatId, tagName);
|
||||
tags = await getTags();
|
||||
|
||||
chat = await updateChatById(localStorage.token, $chatId, {
|
||||
tags: tags.map((tag) => tag.name)
|
||||
});
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue