mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 20:07:49 +01:00
refac
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
function formatJSONString(obj) {
|
function formatJSONString(obj) {
|
||||||
try {
|
try {
|
||||||
const parsed = JSON.parse(obj);
|
const parsed = JSON.parse(JSON.parse(obj));
|
||||||
// If parsed is an object/array, then it's valid JSON
|
// If parsed is an object/array, then it's valid JSON
|
||||||
if (typeof parsed === 'object') {
|
if (typeof parsed === 'object') {
|
||||||
return JSON.stringify(parsed, null, 2);
|
return JSON.stringify(parsed, null, 2);
|
||||||
@@ -192,8 +192,8 @@
|
|||||||
{#if open && !hide}
|
{#if open && !hide}
|
||||||
<div transition:slide={{ duration: 300, easing: quintOut, axis: 'y' }}>
|
<div transition:slide={{ duration: 300, easing: quintOut, axis: 'y' }}>
|
||||||
{#if attributes?.type === 'tool_calls'}
|
{#if attributes?.type === 'tool_calls'}
|
||||||
{@const args = JSON.parse(decode(attributes?.arguments))}
|
{@const args = decode(attributes?.arguments)}
|
||||||
{@const result = JSON.parse(decode(attributes?.result ?? ''))}
|
{@const result = decode(attributes?.result ?? '')}
|
||||||
|
|
||||||
{#if attributes?.done === 'true'}
|
{#if attributes?.done === 'true'}
|
||||||
<Markdown
|
<Markdown
|
||||||
|
|||||||
Reference in New Issue
Block a user