chore: format
This commit is contained in:
@@ -2457,7 +2457,9 @@ async def update_task(
|
|||||||
try:
|
try:
|
||||||
status = status.strip().lower()
|
status = status.strip().lower()
|
||||||
if status not in VALID_TASK_STATUSES:
|
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__)
|
all_tasks = await Chats.get_chat_tasks_by_id(__chat_id__)
|
||||||
|
|
||||||
|
|||||||
@@ -1004,9 +1004,7 @@ async def get_terminal_servers(request: Request):
|
|||||||
terminal_servers = []
|
terminal_servers = []
|
||||||
if request.app.state.redis is not None:
|
if request.app.state.redis is not None:
|
||||||
try:
|
try:
|
||||||
terminal_servers = json.loads(
|
terminal_servers = json.loads(await request.app.state.redis.get(f'{REDIS_KEY_PREFIX}:terminal_servers'))
|
||||||
await request.app.state.redis.get(f'{REDIS_KEY_PREFIX}:terminal_servers')
|
|
||||||
)
|
|
||||||
request.app.state.TERMINAL_SERVERS = terminal_servers
|
request.app.state.TERMINAL_SERVERS = terminal_servers
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error(f'Error fetching terminal_servers from Redis: {e}')
|
log.error(f'Error fetching terminal_servers from Redis: {e}')
|
||||||
|
|||||||
@@ -199,8 +199,9 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<div class="tool-call-body w-full max-w-none!">
|
<div class="tool-call-body w-full max-w-none!">
|
||||||
<pre
|
<pre
|
||||||
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"
|
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(
|
||||||
>{formatJSONString(args)}</pre>
|
args
|
||||||
|
)}</pre>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -217,8 +218,11 @@
|
|||||||
<div class="w-full max-w-none!">
|
<div class="w-full max-w-none!">
|
||||||
{#if typeof parsedResult === 'object' && parsedResult !== null}
|
{#if typeof parsedResult === 'object' && parsedResult !== null}
|
||||||
<pre
|
<pre
|
||||||
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"
|
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(
|
||||||
>{JSON.stringify(parsedResult, null, 2)}</pre>
|
parsedResult,
|
||||||
|
null,
|
||||||
|
2
|
||||||
|
)}</pre>
|
||||||
{:else}
|
{:else}
|
||||||
{@const resultStr = String(parsedResult)}
|
{@const resultStr = String(parsedResult)}
|
||||||
{@const isTruncated = resultStr.length > RESULT_PREVIEW_LIMIT && !expandedResult}
|
{@const isTruncated = resultStr.length > RESULT_PREVIEW_LIMIT && !expandedResult}
|
||||||
|
|||||||
Reference in New Issue
Block a user