refac
This commit is contained in:
1 parent
25898116ea
commit
a7d4c53f3a
1 file changed
+6
-8
@@ -198,10 +198,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="tool-call-body w-full max-w-none!">
|
<div class="tool-call-body w-full max-w-none!">
|
||||||
<Markdown
|
<pre
|
||||||
id={`${componentId}-tool-call-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"
|
||||||
content={`\`\`\`json\n${formatJSONString(args)}\n\`\`\``}
|
>{formatJSONString(args)}</pre>
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -217,10 +216,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<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}
|
||||||
<Markdown
|
<pre
|
||||||
id={`${componentId}-tool-call-result`}
|
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"
|
||||||
content={`\`\`\`json\n${JSON.stringify(parsedResult, null, 2)}\n\`\`\``}
|
>{JSON.stringify(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