diff --git a/src/lib/components/common/Collapsible.svelte b/src/lib/components/common/Collapsible.svelte
index aa841a4f7..02216459a 100644
--- a/src/lib/components/common/Collapsible.svelte
+++ b/src/lib/components/common/Collapsible.svelte
@@ -197,41 +197,63 @@
{/if}
- {#if !grow}
- {#if open && !hide}
-
- {#if attributes?.type === 'tool_calls'}
- {@const args = decode(attributes?.arguments)}
- {@const result = decode(attributes?.result ?? '')}
- {@const files = parseJSONString(decode(attributes?.files ?? ''))}
+ {#if attributes?.type === 'tool_calls'}
+ {@const args = decode(attributes?.arguments)}
+ {@const result = decode(attributes?.result ?? '')}
+ {@const files = parseJSONString(decode(attributes?.files ?? ''))}
- {#if attributes?.done === 'true'}
-
\`\`\`json
+ {#if !grow}
+ {#if open && !hide}
+
+ {#if attributes?.type === 'tool_calls'}
+ {#if attributes?.done === 'true'}
+ \`\`\`json
> ${formatJSONString(args)}
> ${formatJSONString(result)}
> \`\`\``}
- />
+ />
- {#if typeof files === 'object'}
- {#each files ?? [] as file, idx}
- {#if file.startsWith('data:image/')}
-
- {/if}
- {/each}
- {/if}
- {:else}
- \`\`\`json
+ {#if typeof files === 'object'}
+ {#each files ?? [] as file, idx}
+ {#if file.startsWith('data:image/')}
+
+ {/if}
+ {/each}
+ {/if}
+ {:else}
+ \`\`\`json
> ${formatJSONString(args)}
> \`\`\``}
- />
+ />
+ {/if}
+ {:else}
+
{/if}
- {:else}
-
+
+ {/if}
+
+ {#if attributes?.done === 'true'}
+ {#if typeof files === 'object'}
+ {#each files ?? [] as file, idx}
+ {#if file.startsWith('data:image/')}
+
+ {/if}
+ {/each}
{/if}
+ {/if}
+ {/if}
+ {:else if !grow}
+ {#if open && !hide}
+
+
{/if}
{/if}