diff --git a/backend/open_webui/env.py b/backend/open_webui/env.py index b18ba46658..65f95b2755 100644 --- a/backend/open_webui/env.py +++ b/backend/open_webui/env.py @@ -559,9 +559,7 @@ OAUTH_SESSION_TOKEN_ENCRYPTION_KEY = os.environ.get( # Maximum number of concurrent OAuth sessions per user per provider # This prevents unbounded session growth while allowing multi-device usage -OAUTH_MAX_SESSIONS_PER_USER = int( - os.environ.get("OAUTH_MAX_SESSIONS_PER_USER", "10") -) +OAUTH_MAX_SESSIONS_PER_USER = int(os.environ.get("OAUTH_MAX_SESSIONS_PER_USER", "10")) # Token Exchange Configuration # Allows external apps to exchange OAuth tokens for OpenWebUI tokens @@ -985,7 +983,8 @@ OTEL_LOGS_OTLP_SPAN_EXPORTER = os.environ.get( #################################### ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS = ( - os.environ.get("ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS", "True").lower() == "true" + os.environ.get("ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS", "True").lower() + == "true" ) PIP_OPTIONS = os.getenv("PIP_OPTIONS", "").split() diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index a99ea4b015..5136eb7598 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1764,7 +1764,10 @@ async def chat_completion( # Verify chat ownership — lightweight EXISTS check avoids # deserializing the full chat JSON blob just to confirm the row exists - if not Chats.is_chat_owner(metadata["chat_id"], user.id) and user.role != "admin": # admins can access any chat + if ( + not Chats.is_chat_owner(metadata["chat_id"], user.id) + and user.role != "admin" + ): # admins can access any chat raise HTTPException( status_code=status.HTTP_404_NOT_FOUND, detail=ERROR_MESSAGES.DEFAULT(), @@ -1972,7 +1975,6 @@ async def generate_messages( return response - @app.post("/api/chat/completed") async def chat_completed( request: Request, form_data: dict, user=Depends(get_verified_user) diff --git a/backend/open_webui/models/channels.py b/backend/open_webui/models/channels.py index 2253d538c8..e212789a44 100644 --- a/backend/open_webui/models/channels.py +++ b/backend/open_webui/models/channels.py @@ -439,9 +439,7 @@ class ChannelTable: "channel", channel_ids, db=db ) return [ - self._to_channel_model( - c, access_grants=grants_map.get(c.id, []), db=db - ) + self._to_channel_model(c, access_grants=grants_map.get(c.id, []), db=db) for c in all_channels ] diff --git a/backend/open_webui/models/chats.py b/backend/open_webui/models/chats.py index 84c67a5b15..5025cf7fca 100644 --- a/backend/open_webui/models/chats.py +++ b/backend/open_webui/models/chats.py @@ -984,9 +984,7 @@ class ChatTable: try: with get_db_context(db) as db: return db.query( - exists().where( - and_(Chat.id == id, Chat.user_id == user_id) - ) + exists().where(and_(Chat.id == id, Chat.user_id == user_id)) ).scalar() except Exception: return False @@ -1001,9 +999,7 @@ class ChatTable: try: with get_db_context(db) as db: result = ( - db.query(Chat.folder_id) - .filter_by(id=id, user_id=user_id) - .first() + db.query(Chat.folder_id).filter_by(id=id, user_id=user_id).first() ) return result[0] if result else None except Exception: @@ -1074,9 +1070,7 @@ class ChatTable: db.query(Chat) .filter_by(user_id=user_id, pinned=True, archived=False) .order_by(Chat.updated_at.desc()) - .with_entities( - Chat.id, Chat.title, Chat.updated_at, Chat.created_at - ) + .with_entities(Chat.id, Chat.title, Chat.updated_at, Chat.created_at) ) return [ ChatTitleIdResponse.model_validate( @@ -1214,29 +1208,23 @@ class ChatTable: # Check if there are any tags to filter, it should have all the tags if "none" in tag_ids: - query = query.filter( - text( - """ + query = query.filter(text(""" NOT EXISTS ( SELECT 1 FROM json_each(Chat.meta, '$.tags') AS tag ) - """ - ) - ) + """)) elif tag_ids: query = query.filter( and_( *[ - text( - f""" + text(f""" EXISTS ( SELECT 1 FROM json_each(Chat.meta, '$.tags') AS tag WHERE tag.value = :tag_id_{tag_idx} ) - """ - ).params(**{f"tag_id_{tag_idx}": tag_id}) + """).params(**{f"tag_id_{tag_idx}": tag_id}) for tag_idx, tag_id in enumerate(tag_ids) ] ) @@ -1272,29 +1260,23 @@ class ChatTable: # Check if there are any tags to filter, it should have all the tags if "none" in tag_ids: - query = query.filter( - text( - """ + query = query.filter(text(""" NOT EXISTS ( SELECT 1 FROM json_array_elements_text(Chat.meta->'tags') AS tag ) - """ - ) - ) + """)) elif tag_ids: query = query.filter( and_( *[ - text( - f""" + text(f""" EXISTS ( SELECT 1 FROM json_array_elements_text(Chat.meta->'tags') AS tag WHERE tag = :tag_id_{tag_idx} ) - """ - ).params(**{f"tag_id_{tag_idx}": tag_id}) + """).params(**{f"tag_id_{tag_idx}": tag_id}) for tag_idx, tag_id in enumerate(tag_ids) ] ) diff --git a/backend/open_webui/models/knowledge.py b/backend/open_webui/models/knowledge.py index f9defae6ef..4e5e208d8b 100644 --- a/backend/open_webui/models/knowledge.py +++ b/backend/open_webui/models/knowledge.py @@ -286,9 +286,7 @@ class KnowledgeTable: { **self._to_knowledge_model( knowledge_base, - access_grants=grants_map.get( - knowledge_base.id, [] - ), + access_grants=grants_map.get(knowledge_base.id, []), db=db, ).model_dump(), "user": ( diff --git a/backend/open_webui/models/models.py b/backend/open_webui/models/models.py index 25b135c87f..3bffe4ddcf 100755 --- a/backend/open_webui/models/models.py +++ b/backend/open_webui/models/models.py @@ -230,9 +230,7 @@ class ModelsTable: def get_base_models(self, db: Optional[Session] = None) -> list[ModelModel]: with get_db_context(db) as db: - all_models = ( - db.query(Model).filter(Model.base_model_id == None).all() - ) + all_models = db.query(Model).filter(Model.base_model_id == None).all() model_ids = [model.id for model in all_models] grants_map = AccessGrants.get_grants_by_resources("model", model_ids, db=db) return [ diff --git a/backend/open_webui/models/prompts.py b/backend/open_webui/models/prompts.py index dc83ee51dc..e32621f4e5 100644 --- a/backend/open_webui/models/prompts.py +++ b/backend/open_webui/models/prompts.py @@ -217,7 +217,9 @@ class PromptsTable: users = Users.get_users_by_user_ids(user_ids, db=db) if user_ids else [] users_dict = {user.id: user for user in users} - grants_map = AccessGrants.get_grants_by_resources("prompt", prompt_ids, db=db) + grants_map = AccessGrants.get_grants_by_resources( + "prompt", prompt_ids, db=db + ) prompts = [] for prompt in all_prompts: @@ -343,7 +345,9 @@ class PromptsTable: items = query.all() prompt_ids = [prompt.id for prompt, _ in items] - grants_map = AccessGrants.get_grants_by_resources("prompt", prompt_ids, db=db) + grants_map = AccessGrants.get_grants_by_resources( + "prompt", prompt_ids, db=db + ) prompts = [] for prompt, user in items: diff --git a/backend/open_webui/models/skills.py b/backend/open_webui/models/skills.py index 13e62c6f19..6bd5affce8 100644 --- a/backend/open_webui/models/skills.py +++ b/backend/open_webui/models/skills.py @@ -283,7 +283,9 @@ class SkillsTable: items = query.all() skill_ids = [skill.id for skill, _ in items] - grants_map = AccessGrants.get_grants_by_resources("skill", skill_ids, db=db) + grants_map = AccessGrants.get_grants_by_resources( + "skill", skill_ids, db=db + ) skills = [] for skill, user in items: diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index 33d3779a0c..d328ba51a8 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -856,12 +856,14 @@ def get_embedding_function( batch, prefix=prefix, user=user ) - tasks = [generate_batch_with_semaphore(batch) for batch in batches] + tasks = [ + generate_batch_with_semaphore(batch) for batch in batches + ] else: tasks = [ embedding_function(batch, prefix=prefix, user=user) for batch in batches - ] + ] batch_results = await asyncio.gather(*tasks) else: log.debug( diff --git a/backend/open_webui/routers/files.py b/backend/open_webui/routers/files.py index b9c9c73e8e..9022ca66ff 100644 --- a/backend/open_webui/routers/files.py +++ b/backend/open_webui/routers/files.py @@ -400,7 +400,9 @@ async def search_files( Uses SQL-based filtering with pagination for better performance. """ # Determine user_id: null for admin with bypass (search all), user.id otherwise - user_id = None if (user.role == "admin" and BYPASS_ADMIN_ACCESS_CONTROL) else user.id + user_id = ( + None if (user.role == "admin" and BYPASS_ADMIN_ACCESS_CONTROL) else user.id + ) # Use optimized database query with pagination files = Files.search_files( diff --git a/backend/open_webui/routers/openai.py b/backend/open_webui/routers/openai.py index f468a8d105..767aa791f1 100644 --- a/backend/open_webui/routers/openai.py +++ b/backend/open_webui/routers/openai.py @@ -69,8 +69,6 @@ log = logging.getLogger(__name__) ########################################## - - async def send_get_request(url, key=None, user: UserModel = None): timeout = aiohttp.ClientTimeout(total=AIOHTTP_CLIENT_TIMEOUT_MODEL_LIST) try: @@ -374,9 +372,7 @@ async def get_all_models_responses(request: Request, user: UserModel) -> list: request_tasks = [] for idx, url in enumerate(api_base_urls): if (str(idx) not in api_configs) and (url not in api_configs): # Legacy support - request_tasks.append( - get_models_request(url, api_keys[idx], user=user) - ) + request_tasks.append(get_models_request(url, api_keys[idx], user=user)) else: api_config = api_configs.get( str(idx), @@ -716,9 +712,7 @@ async def verify_connection( status_code=500, detail="Failed to connect to Anthropic API" ) if "error" in result: - raise HTTPException( - status_code=500, detail=result["error"] - ) + raise HTTPException(status_code=500, detail=result["error"]) return result else: async with session.get( diff --git a/backend/open_webui/routers/retrieval.py b/backend/open_webui/routers/retrieval.py index 2c8de8c8df..1ff4cef3e6 100644 --- a/backend/open_webui/routers/retrieval.py +++ b/backend/open_webui/routers/retrieval.py @@ -1216,9 +1216,7 @@ async def update_rag_config( request.app.state.config.YANDEX_WEB_SEARCH_CONFIG = ( form_data.web.YANDEX_WEB_SEARCH_CONFIG ) - request.app.state.config.YOUCOM_API_KEY = ( - form_data.web.YOUCOM_API_KEY - ) + request.app.state.config.YOUCOM_API_KEY = form_data.web.YOUCOM_API_KEY return { "status": True, @@ -1950,7 +1948,9 @@ async def process_web( request: Request, form_data: ProcessUrlForm, process: bool = Query(True, description="Whether to process and save the content"), - overwrite: bool = Query(True, description="Whether to overwrite existing collection"), + overwrite: bool = Query( + True, description="Whether to overwrite existing collection" + ), user=Depends(get_verified_user), ): try: @@ -2362,7 +2362,9 @@ async def process_web_search( user, ) - search_tasks = [search_query_with_semaphore(query) for query in form_data.queries] + search_tasks = [ + search_query_with_semaphore(query) for query in form_data.queries + ] else: # Unlimited parallel execution (previous behavior) search_tasks = [ diff --git a/backend/open_webui/utils/anthropic.py b/backend/open_webui/utils/anthropic.py index f567ad562e..736f7238bc 100644 --- a/backend/open_webui/utils/anthropic.py +++ b/backend/open_webui/utils/anthropic.py @@ -62,13 +62,15 @@ async def get_anthropic_models(url: str, key: str, user: UserModel = None) -> di data = await response.json() for model in data.get("data", []): - all_models.append({ - "id": model.get("id"), - "object": "model", - "created": 0, - "owned_by": "anthropic", - "name": model.get("display_name", model.get("id")), - }) + all_models.append( + { + "id": model.get("id"), + "object": "model", + "created": 0, + "owned_by": "anthropic", + "name": model.get("display_name", model.get("id")), + } + ) if not data.get("has_more", False): break @@ -136,37 +138,47 @@ def convert_anthropic_to_openai_payload(anthropic_payload: dict) -> dict: block_type = block.get("type", "text") if block_type == "text": - openai_content.append({ - "type": "text", - "text": block.get("text", ""), - }) + openai_content.append( + { + "type": "text", + "text": block.get("text", ""), + } + ) elif block_type == "image": source = block.get("source", {}) if source.get("type") == "base64": media_type = source.get("media_type", "image/png") data = source.get("data", "") - openai_content.append({ - "type": "image_url", - "image_url": { - "url": f"data:{media_type};base64,{data}", - }, - }) + openai_content.append( + { + "type": "image_url", + "image_url": { + "url": f"data:{media_type};base64,{data}", + }, + } + ) elif source.get("type") == "url": - openai_content.append({ - "type": "image_url", - "image_url": {"url": source.get("url", "")}, - }) + openai_content.append( + { + "type": "image_url", + "image_url": {"url": source.get("url", "")}, + } + ) elif block_type == "tool_use": - tool_calls.append({ - "id": block.get("id", ""), - "type": "function", - "function": { - "name": block.get("name", ""), - "arguments": json.dumps(block.get("input", {})) - if isinstance(block.get("input"), dict) - else str(block.get("input", "{}")), - }, - }) + tool_calls.append( + { + "id": block.get("id", ""), + "type": "function", + "function": { + "name": block.get("name", ""), + "arguments": ( + json.dumps(block.get("input", {})) + if isinstance(block.get("input"), dict) + else str(block.get("input", "{}")) + ), + }, + } + ) elif block_type == "tool_result": # Tool results become separate tool messages in OpenAI format tool_content = block.get("content", "") @@ -181,11 +193,13 @@ def convert_anthropic_to_openai_payload(anthropic_payload: dict) -> dict: if block.get("is_error"): tool_content = f"Error: {tool_content}" - messages.append({ - "role": "tool", - "tool_call_id": block.get("tool_use_id", ""), - "content": tool_content, - }) + messages.append( + { + "role": "tool", + "tool_call_id": block.get("tool_use_id", ""), + "content": tool_content, + } + ) # Build the message if tool_calls: @@ -204,7 +218,9 @@ def convert_anthropic_to_openai_payload(anthropic_payload: dict) -> dict: elif openai_content: # If there's only a single text block, flatten it to a string if len(openai_content) == 1 and openai_content[0]["type"] == "text": - messages.append({"role": role, "content": openai_content[0]["text"]}) + messages.append( + {"role": role, "content": openai_content[0]["text"]} + ) else: messages.append({"role": role, "content": openai_content}) else: @@ -228,14 +244,16 @@ def convert_anthropic_to_openai_payload(anthropic_payload: dict) -> dict: if "tools" in anthropic_payload: openai_tools = [] for tool in anthropic_payload["tools"]: - openai_tools.append({ - "type": "function", - "function": { - "name": tool.get("name", ""), - "description": tool.get("description", ""), - "parameters": tool.get("input_schema", {}), - }, - }) + openai_tools.append( + { + "type": "function", + "function": { + "name": tool.get("name", ""), + "description": tool.get("description", ""), + "parameters": tool.get("input_schema", {}), + }, + } + ) openai_payload["tools"] = openai_tools # tool_choice @@ -294,12 +312,14 @@ def convert_openai_to_anthropic_response( tool_input = json.loads(func.get("arguments", "{}")) except (json.JSONDecodeError, TypeError): tool_input = {} - content.append({ - "type": "tool_use", - "id": tc.get("id", f"toolu_{_uuid.uuid4().hex[:24]}"), - "name": func.get("name", ""), - "input": tool_input, - }) + content.append( + { + "type": "tool_use", + "id": tc.get("id", f"toolu_{_uuid.uuid4().hex[:24]}"), + "name": func.get("name", ""), + "input": tool_input, + } + ) # Usage openai_usage = openai_response.get("usage", {}) @@ -320,9 +340,7 @@ def convert_openai_to_anthropic_response( } -async def openai_stream_to_anthropic_stream( - openai_stream_generator, model: str = "" -): +async def openai_stream_to_anthropic_stream(openai_stream_generator, model: str = ""): """ Convert an OpenAI SSE streaming response to Anthropic Messages SSE format. @@ -391,9 +409,7 @@ async def openai_stream_to_anthropic_stream( if not choices: # Check for usage in the final chunk if data.get("usage"): - input_tokens = data["usage"].get( - "prompt_tokens", input_tokens - ) + input_tokens = data["usage"].get("prompt_tokens", input_tokens) output_tokens = data["usage"].get( "completion_tokens", output_tokens ) @@ -404,9 +420,7 @@ async def openai_stream_to_anthropic_stream( # Update usage if present if data.get("usage"): - input_tokens = data["usage"].get( - "prompt_tokens", input_tokens - ) + input_tokens = data["usage"].get("prompt_tokens", input_tokens) output_tokens = data["usage"].get( "completion_tokens", output_tokens ) @@ -454,9 +468,7 @@ async def openai_stream_to_anthropic_stream( tool_call_started[tc_index] = True # Extract tool call ID and name from the first chunk - tc_id = tc.get( - "id", f"toolu_{_uuid.uuid4().hex[:24]}" - ) + tc_id = tc.get("id", f"toolu_{_uuid.uuid4().hex[:24]}") tc_name = tc.get("function", {}).get("name", "") block_start = { @@ -473,9 +485,7 @@ async def openai_stream_to_anthropic_stream( current_block_index += 1 # Emit argument chunks as input_json_delta - args_chunk = tc.get("function", {}).get( - "arguments", "" - ) + args_chunk = tc.get("function", {}).get("arguments", "") if args_chunk: block_delta = { "type": "content_block_delta", @@ -522,4 +532,3 @@ async def openai_stream_to_anthropic_stream( # Emit message_stop yield f"event: message_stop\ndata: {json.dumps({'type': 'message_stop'})}\n\n".encode() - diff --git a/backend/open_webui/utils/misc.py b/backend/open_webui/utils/misc.py index f162f906f6..447e334227 100644 --- a/backend/open_webui/utils/misc.py +++ b/backend/open_webui/utils/misc.py @@ -98,10 +98,10 @@ def get_message_list(messages_map, message_id): if message_id in visited_message_ids: # Cycle detected, break to prevent infinite loop break - + if message_id is not None: visited_message_ids.add(message_id) - + message_list.append(current_message) parent_id = current_message.get("parentId") # Use .get() for safety current_message = messages_map.get(parent_id) if parent_id else None diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index 3b52e2d972..b23c5c90a3 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -1248,7 +1248,11 @@ class OAuthManager: name=group_name, description=f"Group '{group_name}' created automatically via OAuth.", permissions=default_permissions, # Use default permissions from function args - data={"config": {"share": auth_manager_config.OAUTH_GROUP_DEFAULT_SHARE}}, + data={ + "config": { + "share": auth_manager_config.OAUTH_GROUP_DEFAULT_SHARE + } + }, ) # Use determined creator ID (admin or fallback to current user) created_group = Groups.insert_new_group( @@ -1686,19 +1690,13 @@ class OAuthManager: # unbounded growth while allowing multi-device usage sessions = OAuthSessions.get_sessions_by_user_id(user.id, db=db) provider_sessions = sorted( - [ - session - for session in sessions - if session.provider == provider - ], + [session for session in sessions if session.provider == provider], key=lambda session: session.created_at, reverse=True, ) # Keep the newest sessions up to the limit, prune the rest if len(provider_sessions) >= OAUTH_MAX_SESSIONS_PER_USER: - for old_session in provider_sessions[ - OAUTH_MAX_SESSIONS_PER_USER - 1 : - ]: + for old_session in provider_sessions[OAUTH_MAX_SESSIONS_PER_USER - 1 :]: OAuthSessions.delete_session_by_id(old_session.id, db=db) session = OAuthSessions.create_session( diff --git a/backend/open_webui/utils/plugin.py b/backend/open_webui/utils/plugin.py index df52da6e9f..a2d7b9ad11 100644 --- a/backend/open_webui/utils/plugin.py +++ b/backend/open_webui/utils/plugin.py @@ -8,7 +8,12 @@ import tempfile import logging from typing import Any -from open_webui.env import PIP_OPTIONS, PIP_PACKAGE_INDEX_OPTIONS, OFFLINE_MODE, ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS +from open_webui.env import ( + PIP_OPTIONS, + PIP_PACKAGE_INDEX_OPTIONS, + OFFLINE_MODE, + ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS, +) from open_webui.models.functions import Functions from open_webui.models.tools import Tools @@ -402,7 +407,9 @@ def get_function_module_from_cache(request, function_id, load_from_db=True): def install_frontmatter_requirements(requirements: str): if not ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS: - log.info("ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS is disabled, skipping installation of requirements.") + log.info( + "ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS is disabled, skipping installation of requirements." + ) return if OFFLINE_MODE: diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index 653e002740..310fa999c7 100644 --- a/backend/open_webui/utils/tools.py +++ b/backend/open_webui/utils/tools.py @@ -473,7 +473,15 @@ def get_builtin_tools( # Add memory tools if builtin category enabled AND enabled for this chat if is_builtin_tool_enabled("memory") and features.get("memory"): - builtin_functions.extend([search_memories, add_memory, replace_memory_content, delete_memory, list_memories]) + builtin_functions.extend( + [ + search_memories, + add_memory, + replace_memory_content, + delete_memory, + list_memories, + ] + ) # Add web search tools if builtin category enabled AND enabled globally AND model has web_search capability if ( diff --git a/src/lib/components/admin/Users/Groups.svelte b/src/lib/components/admin/Users/Groups.svelte index 39304e4430..ede1cc378c 100644 --- a/src/lib/components/admin/Users/Groups.svelte +++ b/src/lib/components/admin/Users/Groups.svelte @@ -71,7 +71,6 @@ return 0; }); - let defaultPermissions = {}; let showAddGroupModal = false; diff --git a/src/lib/components/chat/ModelSelector/Selector.svelte b/src/lib/components/chat/ModelSelector/Selector.svelte index b774f24217..5bc1009c3d 100644 --- a/src/lib/components/chat/ModelSelector/Selector.svelte +++ b/src/lib/components/chat/ModelSelector/Selector.svelte @@ -159,7 +159,11 @@ }) ).filter((item) => !(item.model?.info?.meta?.hidden ?? false)); - $: if (selectedTag !== undefined || selectedConnectionType !== undefined || searchValue !== undefined) { + $: if ( + selectedTag !== undefined || + selectedConnectionType !== undefined || + searchValue !== undefined + ) { resetView(); } diff --git a/src/lib/components/chat/Settings/Tools/Connection.svelte b/src/lib/components/chat/Settings/Tools/Connection.svelte index df4908aac2..6ee3c8271b 100644 --- a/src/lib/components/chat/Settings/Tools/Connection.svelte +++ b/src/lib/components/chat/Settings/Tools/Connection.svelte @@ -81,7 +81,9 @@ - + { diff --git a/src/lib/components/notes/Notes.svelte b/src/lib/components/notes/Notes.svelte index b6d31b217f..29487ece9a 100644 --- a/src/lib/components/notes/Notes.svelte +++ b/src/lib/components/notes/Notes.svelte @@ -31,7 +31,13 @@ import { goto } from '$app/navigation'; import { WEBUI_NAME, config, user } from '$lib/stores'; - import { createNewNote, deleteNoteById, getNoteById, getNoteList, searchNotes } from '$lib/apis/notes'; + import { + createNewNote, + deleteNoteById, + getNoteById, + getNoteList, + searchNotes + } from '$lib/apis/notes'; import { capitalizeFirstLetter, copyToClipboard, getTimeRange } from '$lib/utils'; import { downloadPdf, createNoteHandler } from './utils'; diff --git a/src/lib/components/workspace/Prompts.svelte b/src/lib/components/workspace/Prompts.svelte index 026d911568..d5c2d9143d 100644 --- a/src/lib/components/workspace/Prompts.svelte +++ b/src/lib/components/workspace/Prompts.svelte @@ -399,7 +399,6 @@
/{prompt.command}
- {#if !prompt.write_access} @@ -488,7 +487,9 @@