diff --git a/backend/open_webui/tools/builtin.py b/backend/open_webui/tools/builtin.py index 5ed0df7d5..61cd5ede4 100644 --- a/backend/open_webui/tools/builtin.py +++ b/backend/open_webui/tools/builtin.py @@ -2457,7 +2457,9 @@ async def update_task( try: status = status.strip().lower() if status not in VALID_TASK_STATUSES: - return json.dumps({'error': f'Invalid status: {status}. Must be one of: {", ".join(sorted(VALID_TASK_STATUSES))}'}) + return json.dumps( + {'error': f'Invalid status: {status}. Must be one of: {", ".join(sorted(VALID_TASK_STATUSES))}'} + ) all_tasks = await Chats.get_chat_tasks_by_id(__chat_id__) diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index ddee2dc20..da817c474 100644 --- a/backend/open_webui/utils/tools.py +++ b/backend/open_webui/utils/tools.py @@ -1004,9 +1004,7 @@ async def get_terminal_servers(request: Request): terminal_servers = [] if request.app.state.redis is not None: try: - terminal_servers = json.loads( - await request.app.state.redis.get(f'{REDIS_KEY_PREFIX}:terminal_servers') - ) + terminal_servers = json.loads(await request.app.state.redis.get(f'{REDIS_KEY_PREFIX}:terminal_servers')) request.app.state.TERMINAL_SERVERS = terminal_servers except Exception as e: log.error(f'Error fetching terminal_servers from Redis: {e}') diff --git a/src/lib/components/common/ToolCallDisplay.svelte b/src/lib/components/common/ToolCallDisplay.svelte index abd5044b4..1bead4b4d 100644 --- a/src/lib/components/common/ToolCallDisplay.svelte +++ b/src/lib/components/common/ToolCallDisplay.svelte @@ -199,8 +199,9 @@ {:else}
{formatJSONString(args)}
+ class="text-xs text-gray-600 dark:text-gray-300 whitespace-pre font-mono bg-gray-50 dark:bg-gray-900 rounded-lg p-2.5 overflow-x-auto">{formatJSONString(
+ args
+ )}
{JSON.stringify(parsedResult, null, 2)}
+ class="text-xs text-gray-600 dark:text-gray-300 whitespace-pre font-mono bg-gray-50 dark:bg-gray-900 rounded-lg p-2.5 overflow-x-auto">{JSON.stringify(
+ parsedResult,
+ null,
+ 2
+ )}
{:else}
{@const resultStr = String(parsedResult)}
{@const isTruncated = resultStr.length > RESULT_PREVIEW_LIMIT && !expandedResult}