Skip to content

Commit 20544d4

Browse files
committed
chore: format
1 parent cb6e77b commit 20544d4

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

backend/open_webui/tools/builtin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,9 @@ async def update_task(
24572457
try:
24582458
status = status.strip().lower()
24592459
if status not in VALID_TASK_STATUSES:
2460-
return json.dumps({'error': f'Invalid status: {status}. Must be one of: {", ".join(sorted(VALID_TASK_STATUSES))}'})
2460+
return json.dumps(
2461+
{'error': f'Invalid status: {status}. Must be one of: {", ".join(sorted(VALID_TASK_STATUSES))}'}
2462+
)
24612463

24622464
all_tasks = await Chats.get_chat_tasks_by_id(__chat_id__)
24632465

backend/open_webui/utils/tools.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,9 +1004,7 @@ async def get_terminal_servers(request: Request):
10041004
terminal_servers = []
10051005
if request.app.state.redis is not None:
10061006
try:
1007-
terminal_servers = json.loads(
1008-
await request.app.state.redis.get(f'{REDIS_KEY_PREFIX}:terminal_servers')
1009-
)
1007+
terminal_servers = json.loads(await request.app.state.redis.get(f'{REDIS_KEY_PREFIX}:terminal_servers'))
10101008
request.app.state.TERMINAL_SERVERS = terminal_servers
10111009
except Exception as e:
10121010
log.error(f'Error fetching terminal_servers from Redis: {e}')

src/lib/components/common/ToolCallDisplay.svelte

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@
199199
{:else}
200200
<div class="tool-call-body w-full max-w-none!">
201201
<pre
202-
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"
203-
>{formatJSONString(args)}</pre>
202+
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(
203+
args
204+
)}</pre>
204205
</div>
205206
{/if}
206207
</div>
@@ -217,8 +218,11 @@
217218
<div class="w-full max-w-none!">
218219
{#if typeof parsedResult === 'object' && parsedResult !== null}
219220
<pre
220-
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"
221-
>{JSON.stringify(parsedResult, null, 2)}</pre>
221+
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(
222+
parsedResult,
223+
null,
224+
2
225+
)}</pre>
222226
{:else}
223227
{@const resultStr = String(parsedResult)}
224228
{@const isTruncated = resultStr.length > RESULT_PREVIEW_LIMIT && !expandedResult}

0 commit comments

Comments
 (0)