diff --git a/backend/open_webui/models/chats.py b/backend/open_webui/models/chats.py index c55aec6aaf..194823e96a 100644 --- a/backend/open_webui/models/chats.py +++ b/backend/open_webui/models/chats.py @@ -67,6 +67,7 @@ class ChatModel(BaseModel): class ChatForm(BaseModel): chat: dict + folder_id: Optional[str] = None class ChatImportForm(ChatForm): @@ -121,6 +122,7 @@ class ChatTable: else "New Chat" ), "chat": form_data.chat, + "folder_id": form_data.folder_id, "created_at": int(time.time()), "updated_at": int(time.time()), } @@ -639,8 +641,7 @@ class ChatTable: sqlite_content_clause = text(sqlite_content_sql) query = query.filter( or_( - Chat.title.ilike(bindparam('title_key')), - sqlite_content_clause + Chat.title.ilike(bindparam("title_key")), sqlite_content_clause ).params(title_key=f"%{search_text}%", content_key=search_text) ) @@ -686,8 +687,8 @@ class ChatTable: postgres_content_clause = text(postgres_content_sql) query = query.filter( or_( - Chat.title.ilike(bindparam('title_key')), - postgres_content_clause + Chat.title.ilike(bindparam("title_key")), + postgres_content_clause, ).params(title_key=f"%{search_text}%", content_key=search_text) ) diff --git a/src/app.css b/src/app.css index b1c370532a..91302ca076 100644 --- a/src/app.css +++ b/src/app.css @@ -475,7 +475,7 @@ input[type='number'] { pointer-events: none; } -.tiptap > pre > code { +.tiptap pre > code { border-radius: 0.4rem; font-size: 0.85rem; padding: 0.25em 0.3em; @@ -483,7 +483,7 @@ input[type='number'] { @apply dark:bg-gray-800 bg-gray-50; } -.tiptap > pre { +.tiptap pre { border-radius: 0.5rem; font-family: 'JetBrainsMono', monospace; margin: 1.5rem 0; diff --git a/src/lib/components/notes/AIMenu.svelte b/src/lib/components/notes/AIMenu.svelte new file mode 100644 index 0000000000..025c2ba405 --- /dev/null +++ b/src/lib/components/notes/AIMenu.svelte @@ -0,0 +1,62 @@ + + + + + + + + + fade(e, { duration: 100 })} + > + + + + + + diff --git a/src/lib/components/notes/NoteEditor.svelte b/src/lib/components/notes/NoteEditor.svelte index b28a7b36bf..95aea9c9fb 100644 --- a/src/lib/components/notes/NoteEditor.svelte +++ b/src/lib/components/notes/NoteEditor.svelte @@ -80,6 +80,7 @@ import Sidebar from '../common/Sidebar.svelte'; import ArrowRight from '../icons/ArrowRight.svelte'; import Cog6 from '../icons/Cog6.svelte'; + import AiMenu from './AIMenu.svelte'; export let id: null | string = null; @@ -1005,8 +1006,8 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings, {/if} -
-
+
+
{#if recording}
- +
- - {#if editing} {:else} - +
+ +
+ {/if}
diff --git a/src/lib/components/notes/NotePanel.svelte b/src/lib/components/notes/NotePanel.svelte index 21aa48b160..d26f4b72c7 100644 --- a/src/lib/components/notes/NotePanel.svelte +++ b/src/lib/components/notes/NotePanel.svelte @@ -78,7 +78,7 @@ {/if} {:else if show}
@@ -98,7 +98,7 @@ {#if show}
diff --git a/src/lib/components/notes/RecordMenu.svelte b/src/lib/components/notes/RecordMenu.svelte index bc4bad2d3a..13f331eddd 100644 --- a/src/lib/components/notes/RecordMenu.svelte +++ b/src/lib/components/notes/RecordMenu.svelte @@ -48,7 +48,7 @@ }} >
- +
{$i18n.t('Record')}
@@ -61,7 +61,7 @@ }} >
- +
{$i18n.t('Capture Audio')}
@@ -74,7 +74,7 @@ }} >
- +
{$i18n.t('Upload Audio')}