From 323139cdf56e3e0f40b575c2dce634df319f7883 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 14 Oct 2026 18:11:14 +0400 Subject: [PATCH] refac --- backend/open_webui/models/channels.py | 4 +++- backend/open_webui/models/messages.py | 1 + backend/open_webui/utils/skill_files.py | 4 +++- src/lib/components/admin/Settings/Integrations.svelte | 5 +---- src/lib/components/channel/MessageInput.svelte | 1 - src/lib/components/channel/Messages.svelte | 6 +----- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/backend/open_webui/models/channels.py b/backend/open_webui/models/channels.py index 657ceedde2..83e3f85bd7 100644 --- a/backend/open_webui/models/channels.py +++ b/backend/open_webui/models/channels.py @@ -610,7 +610,9 @@ class ChannelTable: self, channel_id: str, db: Optional[AsyncSession] = None ) -> list[ChannelMemberModel]: async with get_async_db_context(db) as db: - result = await db.execute(select(ChannelMember).filter(ChannelMember.channel_id == channel_id, ChannelMember.user_id.is_not(None))) + result = await db.execute( + select(ChannelMember).filter(ChannelMember.channel_id == channel_id, ChannelMember.user_id.is_not(None)) + ) memberships = result.scalars().all() return [ChannelMemberModel.model_validate(membership) for membership in memberships] diff --git a/backend/open_webui/models/messages.py b/backend/open_webui/models/messages.py index 31251e11ff..51aefe91af 100644 --- a/backend/open_webui/models/messages.py +++ b/backend/open_webui/models/messages.py @@ -305,6 +305,7 @@ class MessageTable: """Resolve user info from message, handling webhook messages.""" if message.app_id: from open_webui.models.apps import App + app = await db.get(App, message.app_id) return { 'id': message.app_id, diff --git a/backend/open_webui/utils/skill_files.py b/backend/open_webui/utils/skill_files.py index 871b2a8a97..220f94fa12 100644 --- a/backend/open_webui/utils/skill_files.py +++ b/backend/open_webui/utils/skill_files.py @@ -485,7 +485,9 @@ async def load_skill_from_url(url: str) -> list[dict]: raise ValueError('Could not download the skill. Check that the URL is accessible.') content_type = response.content_type if content_type == 'text/html': - raise ValueError('The URL returned a web page. Use a raw skill file or a ZIP/.skill download link.') + raise ValueError( + 'The URL returned a web page. Use a raw skill file or a ZIP/.skill download link.' + ) data = bytearray() async for chunk in response.content.iter_chunked(64 * 1024): data.extend(chunk) diff --git a/src/lib/components/admin/Settings/Integrations.svelte b/src/lib/components/admin/Settings/Integrations.svelte index e094baaf60..267849ef17 100644 --- a/src/lib/components/admin/Settings/Integrations.svelte +++ b/src/lib/components/admin/Settings/Integrations.svelte @@ -117,10 +117,7 @@ }; const addTerminalConnection = (server: TerminalConnection) => { - terminalConnections = [ - ...terminalConnections, - { ...server, id: server.id ?? uuidv4() } - ]; + terminalConnections = [...terminalConnections, { ...server, id: server.id ?? uuidv4() }]; saveTerminalServers(); }; diff --git a/src/lib/components/channel/MessageInput.svelte b/src/lib/components/channel/MessageInput.svelte index cb4dc08669..12579bf0f5 100644 --- a/src/lib/components/channel/MessageInput.svelte +++ b/src/lib/components/channel/MessageInput.svelte @@ -682,7 +682,6 @@ } onMount(() => { - const unsubscribe = channelRequestQueues.subscribe(() => { files = [...files]; }); diff --git a/src/lib/components/channel/Messages.svelte b/src/lib/components/channel/Messages.svelte index 5e002d0ca3..f8f3e6afe0 100644 --- a/src/lib/components/channel/Messages.svelte +++ b/src/lib/components/channel/Messages.svelte @@ -303,11 +303,7 @@
{#key event.reply} - + {/key}