Skip to content

Commit

Permalink
Restore accidentally rolled back code.
Browse files Browse the repository at this point in the history
  • Loading branch information
wmeddie committed Nov 30, 2024
1 parent abd5b3c commit 847c684
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions src/lib/components/MessageCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,26 @@
class:fork-selected={forkSelected}
>
<p class="mb-3 font-normal text-gray-700 dark:text-gray-100 prose max-w-full">
{#if isSource}
<CodeRenderer lang="markdown" text={content} />
{:else}
<SvelteMarkdown source={content} renderers={{ code: CodeRenderer }} />
{/if}
</p>
{#if Array.isArray(contentItems)}
{#each contentItems as item}
{#if item.type === 'text'}
{#if isSource}
<CodeRenderer lang="markdown" text={item.text} />
{:else}
<SvelteMarkdown source={item.text} renderers={{ code: CodeRenderer }} />
{/if}
{:else if item.type === 'image_url'}
<img src={item.image_url.url} alt="user image" class="thumbnail" />
{/if}
{/each}
{:else}
{#if isSource}
<CodeRenderer lang="markdown" text={contentItems} />
{:else}
<SvelteMarkdown source={contentItems} renderers={{ code: CodeRenderer }} />
{/if}
{/if}
</p>
<hr />
<div class="flex items-center justify-between py-2">
{#if alternativesCount > 1}
Expand Down

0 comments on commit 847c684

Please sign in to comment.