diff --git a/src/lib/components/layout/Navbar.svelte b/src/lib/components/layout/Navbar.svelte
index e75dafd67..521e7abcc 100644
--- a/src/lib/components/layout/Navbar.svelte
+++ b/src/lib/components/layout/Navbar.svelte
@@ -6,6 +6,7 @@
import { getChatById } from '$lib/apis/chats';
import { chatId, modelfiles } from '$lib/stores';
import ShareChatModal from '../chat/ShareChatModal.svelte';
+ import { stringify } from 'postcss';
export let initNewChat: Function;
export let title: string = 'Ollama Web UI';
@@ -13,6 +14,24 @@
let showShareChatModal = false;
+ let tags = [
+ // {
+ // name: 'general'
+ // },
+ // {
+ // name: 'medicine'
+ // },
+ // {
+ // name: 'cooking'
+ // },
+ // {
+ // name: 'education'
+ // }
+ ];
+
+ let tagName = '';
+ let showTagInput = false;
+
const shareChat = async () => {
const chat = (await getChatById(localStorage.token, $chatId)).chat;
console.log('share', chat);
@@ -54,6 +73,20 @@
saveAs(blob, `chat-${chat.title}.txt`);
};
+
+ const addTag = () => {
+ if (!tags.find((e) => e.name === tagName)) {
+ tags = [
+ ...tags,
+ {
+ name: JSON.parse(JSON.stringify(tagName))
+ }
+ ];
+ }
+
+ tagName = '';
+ showTagInput = false;
+ };