Skip to content

Commit a7d4c53

Browse files
committed
refac
1 parent 2589811 commit a7d4c53

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

src/lib/components/common/ToolCallDisplay.svelte

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,9 @@
198198
</div>
199199
{:else}
200200
<div class="tool-call-body w-full max-w-none!">
201-
<Markdown
202-
id={`${componentId}-tool-call-args`}
203-
content={`\`\`\`json\n${formatJSONString(args)}\n\`\`\``}
204-
/>
201+
<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>
205204
</div>
206205
{/if}
207206
</div>
@@ -217,10 +216,9 @@
217216
</div>
218217
<div class="w-full max-w-none!">
219218
{#if typeof parsedResult === 'object' && parsedResult !== null}
220-
<Markdown
221-
id={`${componentId}-tool-call-result`}
222-
content={`\`\`\`json\n${JSON.stringify(parsedResult, null, 2)}\n\`\`\``}
223-
/>
219+
<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>
224222
{:else}
225223
{@const resultStr = String(parsedResult)}
226224
{@const isTruncated = resultStr.length > RESULT_PREVIEW_LIMIT && !expandedResult}

0 commit comments

Comments
 (0)