From f1be85d997439b49fc143d2bcd2dc710f44446c8 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 14 Apr 2026 17:25:42 -0500 Subject: [PATCH] refac --- src/lib/components/layout/Sidebar.svelte | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index dcd1c7cc78..61a9168c19 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -46,6 +46,7 @@ import { createNewFolder, getFolders, updateFolderParentIdById } from '$lib/apis/folders'; import { checkActiveChats } from '$lib/apis/tasks'; import { getPinnedNoteList, toggleNotePinnedStatusById } from '$lib/apis/notes'; + import { createNoteHandler } from '$lib/components/notes/utils'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants'; import ArchivedChatsModal from './ArchivedChatsModal.svelte'; @@ -1090,6 +1091,13 @@ name={$i18n.t('Notes')} chevron={false} dragAndDrop={false} + onAdd={async () => { + const note = await createNoteHandler('New Note'); + if (note) { + goto(`/notes/${note.id}`); + } + }} + onAddLabel={$i18n.t('New Note')} >
{#each $pinnedNotes as note (note.id)}