Timothy Jaeryang Baek 3 months ago
parent
commit
0a49c366f0
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/lib/components/common/Collapsible.svelte

+ 3 - 3
src/lib/components/common/Collapsible.svelte

@@ -167,15 +167,15 @@
 						<Markdown
 						<Markdown
 							id={`tool-calls-${attributes?.id}-result`}
 							id={`tool-calls-${attributes?.id}-result`}
 							content={`> \`\`\`json
 							content={`> \`\`\`json
-> ${JSON.parse(decode(attributes?.arguments))}
-> ${JSON.parse(decode(attributes?.result))}
+> ${JSON.stringify(JSON.parse(JSON.parse(decode(attributes?.arguments))), null, 2)}
+> ${JSON.stringify(JSON.parse(JSON.parse(decode(attributes?.result))), null, 2)}
 > \`\`\``}
 > \`\`\``}
 						/>
 						/>
 					{:else}
 					{:else}
 						<Markdown
 						<Markdown
 							id={`tool-calls-${attributes?.id}-result`}
 							id={`tool-calls-${attributes?.id}-result`}
 							content={`> \`\`\`json
 							content={`> \`\`\`json
-> ${JSON.parse(decode(attributes?.arguments))}
+> ${JSON.stringify(JSON.parse(JSON.parse(decode(attributes?.arguments))), null, 2)}
 > \`\`\``}
 > \`\`\``}
 						/>
 						/>
 					{/if}
 					{/if}